# |
Oct 5th 2018, 19:38 |
itmpls |
user_id and user_group_id, sorry |
# |
Oct 5th 2018, 19:27 |
btx |
what are the columns in the join table? `user_id` and `site_user_group_id` or `user_group_id` |
# |
Oct 5th 2018, 19:25 |
btx |
Cake doesn’t care what the db is named, as long as the class names work it can automagic the files/classes to load |
# |
Oct 5th 2018, 19:24 |
btx |
is that on `UsersTable`? |
# |
Oct 5th 2018, 19:23 |
itmpls |
hah |
# |
Oct 5th 2018, 19:23 |
itmpls |
but the className again is SiteUserGroupsUsers not UserGroupsUsers |
# |
Oct 5th 2018, 19:23 |
itmpls |
for example |
# |
Oct 5th 2018, 19:23 |
itmpls |
currently i have $this->belongsToMany('SiteUserGroups', ['className' => 'SiteUsers.SiteUserGroups', 'foreignKey' => 'user_id', 'joinTable' => 'user_groups_users']); |
# |
Oct 5th 2018, 19:22 |
itmpls |
I do a setTable override |
# |
Oct 5th 2018, 19:22 |
itmpls |
no |
# |
Oct 5th 2018, 19:22 |
btx |
is it prefixed in the database? |
# |
Oct 5th 2018, 19:22 |
itmpls |
prefixed by Site |
# |
Oct 5th 2018, 19:22 |
itmpls |
if the table is 'user_groups_user' but the class name is say, 'SiteUserGroupsUsers' |
# |
Oct 5th 2018, 19:21 |
itmpls |
also, if the class name for my join table was prefixed, would I have to set that in the belongsToMany association? |
# |
Oct 5th 2018, 19:14 |
btx |
(plural on second `user`) |
# |
Oct 5th 2018, 19:14 |
itmpls |
yeah that makes sense |
# |
Oct 5th 2018, 19:14 |
btx |
the join table should be `user_groups_users` I think tho |
# |
Oct 5th 2018, 19:14 |
btx |
should be UserGroups first because G < S |
# |
Oct 5th 2018, 19:12 |
itmpls |
end goal is to save my entity which belongsToMany('UserGroupsUser', ['joinTable' => 'user_groups_user']); |
# |
Oct 5th 2018, 19:12 |
itmpls |
with how cake expects things to be alphabetical, if i have a 'UserGroupsUser' table does it expect 'User' to be plural and in front, or UserGroups since they start with the same word? |
# |
Oct 5th 2018, 18:16 |
quinquo |
mescalito: pdksh+openbsd |
# |
Oct 5th 2018, 18:16 |
quinquo |
fixes lots of crashes. I have to admit, i don't think I've ever had it crash on me |
# |
Oct 5th 2018, 17:40 |
flashios09 |
so the **post entity** will have **my_fake_table entity** `$post->my_fake_table` |
# |
Oct 5th 2018, 17:37 |
slackebot |
<flashios09> |
# |
Oct 5th 2018, 17:36 |
flashios09 |
and it will generate this query: |
# |
Oct 5th 2018, 17:35 |
slackebot |
<flashios09> |
# |
Oct 5th 2018, 17:35 |
flashios09 |
then we can do: |
# |
Oct 5th 2018, 17:28 |
slackebot |
<flashios09> |
# |
Oct 5th 2018, 17:26 |
slackebot |
// .. ]); } } ``` |
# |
Oct 5th 2018, 17:26 |
flashios09 |
```php <?php namespace App\Model\Table; use App\ORM\Table; class MyFakeTable extends Table { public function initialize(array $config){ // don't use a hard table $this->table(false); // create a fake schema // i don't know, maybe something like this $this->schema([ 'id' => 'MYSQL_CUSTOM_FUNCTION()', 'another_fake_field' => 'ANOTHER_MYSQL_CUSTOM_FUNCTION()', |
# |
Oct 5th 2018, 17:26 |
flashios09 |
is it possible to create a fake table(model/entity), something like this: |
# |
Oct 5th 2018, 17:20 |
flashios09 |
hi |
# |
Oct 5th 2018, 16:11 |
sonicrocketmanFl |
Hello. Can anyone tell me, what does it mean, Total Hash Rate: (24h) 0.00 H/s (12h) 0.00 H/s (1h) 0.00 H/s (10m) 8.40 KH/s |
# |
Oct 5th 2018, 16:11 |
sonicrocketmanFl |
but I think I have the idea of how to fix this one, thanks for the help! |
# |
Oct 5th 2018, 16:11 |
sonicrocketmanFl |
OH MOTHER FUCKER |
# |
Oct 5th 2018, 16:11 |
sonicrocketmanFl |
dviola, if so, you can set up netconsole and get the kernel messages sent to the other PC when the first crashes |
# |
Oct 5th 2018, 16:11 |
sonicrocketmanFl |
System Info: Model: VMware7 · CPU Speed: 2 @ 3.16 GHz · L2: 256 KB · L3: 6 MB · RAM: 8 GB · OS X: Version 10.6.8 (Build 10K549) · Hostname: SnowLeopardVM · User: tron · Client: Linkinus 2.4.3/25089 · Style: Whisper |
# |
Oct 5th 2018, 16:11 |
sonicrocketmanFl |
lin_noob: uhmm, support cost _is_ part of the cost. nobody buys stuff at that level without adequate cost. TCO |
# |
Oct 5th 2018, 16:09 |
unclezoot |
cheers |
# |
Oct 5th 2018, 16:05 |
admad |
unclezoot: you forgot "use Cake\ORM\Query" |
# |
Oct 5th 2018, 15:35 |
unclezoot |
my custom finder method looks like this NotificationsTable.php: public function findCrud(Query $query, array $options) { } |