# |
Apr 8th 2019, 15:35 |
neon1024 |
So the test suite provides `assertResponseContains` |
# |
Apr 8th 2019, 15:03 |
rogerpro |
It makes sense, @spriz |
# |
Apr 8th 2019, 14:59 |
spriz |
I realise I need different aliases for the properties, but that’s no problemo :slightly_smiling_face: |
# |
Apr 8th 2019, 14:58 |
spriz |
I need to start marking “Products” as alternatives to other Products - and the obvious thing imo is a `products_products` `BelongsToMany` assoc with a source and a target fk - am I on the road to something really stupid? |
# |
Apr 8th 2019, 14:51 |
devito |
cross db joining a thing in cake 3? |
# |
Apr 8th 2019, 14:48 |
rogerpro |
How to allow the user to sort by a calculated MAX() field with pagination in Cake 2? |
# |
Apr 8th 2019, 13:28 |
Nitrogen |
actually, HAVING worked just fine. |
# |
Apr 8th 2019, 12:55 |
asdfgh |
why Time::parse('now') returns 4/8/19, 12:54 PM i need this format 'Y-m-d H:i:s' (for db) |
# |
Apr 8th 2019, 12:52 |
dereuromark |
you can make a sippet and reuse that, see how it is done in my geo plugin for example. |
# |
Apr 8th 2019, 12:51 |
Nitrogen |
I also just found a suggestion to use HAVING, but I don't use that specific calculated field for grouping. not sure it'll work this way. |
# |
Apr 8th 2019, 12:50 |
Nitrogen |
yup |
# |
Apr 8th 2019, 12:48 |
dereuromark |
in 3.x? |
# |
Apr 8th 2019, 12:37 |
Nitrogen |
hey, guys! In my model query I'm trying to perform a WHERE-search on a calculated field, which ends with 'unknown column'. What is suggested way of doing this? The only reference I found in documentation is by using collection filter. Is that the way to go? |
# |
Apr 8th 2019, 12:29 |
conehead |
@dereuromark Yes thank you for your help. This plugin already helps me a lot. I am just getting into cake 3 and would like to learn as much as possible |
# |
Apr 8th 2019, 12:28 |
dereuromark |
well, the plugin takes care of some stuff for you, including what fields can be patched etc. so best to either use it or at least look into what it does. |
# |
Apr 8th 2019, 12:28 |
conehead |
aargh. id field was varchar and not char |
# |
Apr 8th 2019, 12:23 |
asdfgh |
:D |
# |
Apr 8th 2019, 12:23 |
asdfgh |
love cake! |
# |
Apr 8th 2019, 12:23 |
asdfgh |
https://api.cakephp.org/3.7/class-Cake.ORM.Behavior.TimestampBehavior.html#_touch |
# |
Apr 8th 2019, 12:22 |
asdfgh |
? |
# |
Apr 8th 2019, 12:22 |
asdfgh |
is tehre a "touch" method to just update that record's field |
# |
Apr 8th 2019, 12:21 |
asdfgh |
only that column |
# |
Apr 8th 2019, 12:21 |
asdfgh |
guys i have to update the modifieed field |
# |
Apr 8th 2019, 12:21 |
asdfgh |
edgaras.jac i called agent_project_views i read that the last must be plural |
# |
Apr 8th 2019, 12:20 |
conehead |
I mean...after calling `patchEntity()` everything looks fine. I got my object that contains an array with a single tag that existed already. It correctly shows `new = false`. This `Tag` contains an object `Taggable` with the correct data as well. It even says `new = true`. But when saving, the `Taggable` object contains an empty id and the `created` and `modified` date is not set |
# |
Apr 8th 2019, 12:16 |
conehead |
@dereuromark No, I am trying to fully understand it first. So currently I am not using any plugin. Probably I will switch back later to your plugin again. Right now it is just about understanding |
# |
Apr 8th 2019, 12:10 |
dereuromark |
Are you using the Tags plugin? |
# |
Apr 8th 2019, 10:58 |
slackebot |
correct entity is not used when saving. Any ideas? |
# |
Apr 8th 2019, 10:58 |
conehead |
I still don't get it. I have a belongsToMany association. ```$table->belongsToMany('Tags', [ 'foreignKey' => 'foreign_key', 'through' => 'Tagged', ]); ``` When I load my entity, I can see my Tags (as Tag Entities) and the _joinData (as Tagged Entity). It seems to work fine. But when I am saving my entity, no ID is generated. The field keeps empty. Additionally the TimeStamp behavior is ignored. Looks like the |
# |
Apr 8th 2019, 10:08 |
edgaras.jan |
asdfgh: plural |
# |
Apr 8th 2019, 09:27 |
asdfgh |
anyone? |
# |
Apr 8th 2019, 09:14 |
conehead |
Hm anyone got an idea how this might happen? `Call to a member function setAccess() on string` |
# |
Apr 8th 2019, 09:00 |
asdfgh |
i have two tables agents projects now i have to create a new table where i save the views that an agent does on projects should i call it agent_project_views or agents_projects_views ? |
# |
Apr 8th 2019, 08:59 |
asdfgh |
hello |
# |
Apr 8th 2019, 08:53 |
conehead |
Ah, might have to use objects instead of plain ids |
# |
Apr 8th 2019, 08:51 |
conehead |
I am trying to store some data with joinData. Unfortunately for the data no id is generated automatically. The Id field always keeps empty which causes errors. ``` Array ( [0] => Array ( [_joinData] => Array ( [model] => archive ) [id] => 5c8e50a8-3500-4bf2-bf68-0027ac140004 ) ) ``` Anyone got an Idea why this might be happening? |
# |
Apr 8th 2019, 08:33 |
narendravaghela |
yes |
# |
Apr 8th 2019, 08:25 |
conehead |
I think my biggest problem are the plugins I was using. |
# |
Apr 8th 2019, 08:24 |
narendravaghela |
@conehead Thanks mate! I also believe it is a kind of rewriting the app, we can just use the existing business logic and convert it into 3.x code base |
# |
Apr 8th 2019, 08:23 |
conehead |
@narendravaghela Currently doing the same. Pretty much tried every tools. They mainly helped with reordering the structure. Due to a couple of old plugins I was using, I am more or less rewriting everything right now |
# |
Apr 8th 2019, 07:36 |
kani |
Can i auth async request with csrfToken ? |