# |
Mar 12th 2019, 18:24 |
ricksaccous |
or only want the status of the first agreement |
# |
Mar 12th 2019, 18:24 |
ricksaccous |
not sure if you want to loop again through agreements |
# |
Mar 12th 2019, 18:24 |
ricksaccous |
@tjkalinowski it's agreements not agreement |
# |
Mar 12th 2019, 18:08 |
slackebot |
<tjkalinowski> |
# |
Mar 12th 2019, 17:57 |
dereuromark |
Anyone find this interesting? https://github.com/FriendsOfCake/search/pull/248 |
# |
Mar 12th 2019, 15:59 |
yoniabad |
Hello, I have a query composed of three tables joined with the function union (). I have problems with searches, will there be any way to optimize this query? Thank you. |
# |
Mar 12th 2019, 15:32 |
dereuromark |
I think so, those are like 1-2 years old in that repo^^ |
# |
Mar 12th 2019, 15:32 |
jeremyharris |
cake only recently supported binary uuids though, yeah? |
# |
Mar 12th 2019, 15:32 |
dereuromark |
at least when joining or paginating that killed our apps. |
# |
Mar 12th 2019, 15:31 |
dereuromark |
some time ago I tried the binary(16) uuids as they are almost as performant as aiid ( https://github.com/dereuromark/cakephp-shim/tree/master/src/Database/Type ), char36 UUID are bad for performance |
# |
Mar 12th 2019, 15:30 |
half2me |
just by reading CHAR(36) :) |
# |
Mar 12th 2019, 15:30 |
half2me |
makes it more clear what you are trying to do for someone who might not know exactly what you are trying to do there |
# |
Mar 12th 2019, 15:30 |
jeremyharris |
yeah abstract types are nice |
# |
Mar 12th 2019, 15:30 |
half2me |
I prefer to use those types instead of just putting char(36) |
# |
Mar 12th 2019, 15:29 |
half2me |
np, good to know there is a uuid type for migrations :slightly_smiling_face: |
# |
Mar 12th 2019, 15:29 |
jeremyharris |
yep np, sorry about the mixup :) |
# |
Mar 12th 2019, 15:29 |
jeremyharris |
I agree |
# |
Mar 12th 2019, 15:29 |
half2me |
thanks for the help :slightly_smiling_face: |
# |
Mar 12th 2019, 15:29 |
half2me |
its a simple behavior, but it would make the code cleaner |
# |
Mar 12th 2019, 15:29 |
half2me |
yeah I think I'll do that |
# |
Mar 12th 2019, 15:29 |
jeremyharris |
yeah you can make your own behavior rather quickly to keep it clean like that :+1: |
# |
Mar 12th 2019, 15:28 |
half2me |
just thought it might be cleaner if I could use a behavior |
# |
Mar 12th 2019, 15:28 |
jeremyharris |
ok no the generation is done outside of the type class (using the type class newId method) |
# |
Mar 12th 2019, 15:28 |
half2me |
and just put it in the beforeSave |
# |
Mar 12th 2019, 15:27 |
jeremyharris |
lemme check the type class |
# |
Mar 12th 2019, 15:27 |
half2me |
i mean I could always use the Text::uuid() |
# |
Mar 12th 2019, 15:27 |
jeremyharris |
nah not that I know of. there might be on FOC awesome list |
# |
Mar 12th 2019, 15:27 |
half2me |
there were functions for generating, renewing etc. |
# |
Mar 12th 2019, 15:27 |
half2me |
and I saw in the database type |
# |
Mar 12th 2019, 15:27 |
half2me |
because I would need to regenerate those values sometimes |
# |
Mar 12th 2019, 15:27 |
jeremyharris |
but char(36) is still what you want |
# |
Mar 12th 2019, 15:27 |
half2me |
just wondering if there is a behavior for that |
# |
Mar 12th 2019, 15:27 |
half2me |
no problem, yeah I thought I would need to |
# |
Mar 12th 2019, 15:26 |
jeremyharris |
sorry I misunderstood |
# |
Mar 12th 2019, 15:26 |
half2me |
I mean it doesn't cause any problems if we always stamp it |
# |
Mar 12th 2019, 15:26 |
jeremyharris |
then if it’s just a field like that you will have to populate it yourself |
# |
Mar 12th 2019, 15:26 |
half2me |
but only sometimes stamped |
# |
Mar 12th 2019, 15:26 |
jeremyharris |
ooooh |
# |
Mar 12th 2019, 15:26 |
half2me |
its just an identifier stamped on an entity |
# |
Mar 12th 2019, 15:26 |
half2me |
none |
# |
Mar 12th 2019, 15:26 |
jeremyharris |
is this for a FK or a PK? |