# |
Apr 19th 2017, 11:13 |
inoas |
_setIsPublished right |
# |
Apr 19th 2017, 11:12 |
inoas |
in which mutator/accessor would that happen? |
# |
Apr 19th 2017, 11:11 |
inoas |
to save the state along |
# |
Apr 19th 2017, 11:11 |
inoas |
i want to set was_published to 1 in my entity |
# |
Apr 19th 2017, 11:11 |
inoas |
when is_published is set to 1 |
# |
Apr 19th 2017, 10:58 |
hmic |
that poor cobra-the-joker... 1.2 :DD |
# |
Apr 19th 2017, 10:54 |
hmic |
no, thats worong too :/ |
# |
Apr 19th 2017, 10:54 |
hmic |
so add after line 26 'order' => ['Users.name' => 'asc'] instead of line 31 |
# |
Apr 19th 2017, 10:53 |
hmic |
thats what i thought, you need to taret the correct one on its most outer scope, so on Holidays, not Days |
# |
Apr 19th 2017, 10:53 |
Neon1024 |
Time for a break :) |
# |
Apr 19th 2017, 10:53 |
Neon1024 |
Ah, it is two queries, that’s why! |
# |
Apr 19th 2017, 10:52 |
Neon1024 |
I get an SQL error because the table isn’t joined, it’s very strange |
# |
Apr 19th 2017, 10:52 |
Neon1024 |
But when you add in an 'Users.first_name' => 'asc' |
# |
Apr 19th 2017, 10:51 |
Neon1024 |
But if it’s joined I should be able order the query |
# |
Apr 19th 2017, 10:51 |
Neon1024 |
Might be because of this, INNER JOIN `users` `Users` ON `Users`.`id` = (`Holidays`.`user_id`) |
# |
Apr 19th 2017, 10:50 |
hmic |
however, i'm not sure if it has to do with your actual problem really. but maybe you try with just adding ->order() without contain/matching just to get a better idea where the error stems from |
# |
Apr 19th 2017, 10:49 |
hmic |
if($team) matching() else contain() |
# |
Apr 19th 2017, 10:49 |
Neon1024 |
I don’t display the team, so not much use containing it |
# |
Apr 19th 2017, 10:49 |
Neon1024 |
No, you’re right |
# |
Apr 19th 2017, 10:49 |
hmic |
as long as you do not use a different alias, it makes no sense to me |
# |
Apr 19th 2017, 10:48 |
Neon1024 |
It’s a holiday calendar :) |
# |
Apr 19th 2017, 10:48 |
hmic |
still an eigher or |
# |
Apr 19th 2017, 10:48 |
Neon1024 |
As I still want to show all the days |
# |
Apr 19th 2017, 10:48 |
Neon1024 |
So I can find all the days with users on holiday, who are in a certain team |
# |
Apr 19th 2017, 10:48 |
Neon1024 |
It’s conditional |
# |
Apr 19th 2017, 10:47 |
hmic |
it's an eigher/or, isn't it? |
# |
Apr 19th 2017, 10:47 |
hmic |
why do you contain and matching teams btw? |
# |
Apr 19th 2017, 10:47 |
hmic |
maybe the matching associated with it?! |
# |
Apr 19th 2017, 10:46 |
hmic |
in this case the order should but work |
# |
Apr 19th 2017, 10:45 |
Neon1024 |
No, turns out it’s a hasMany, so it’s doing two queries rather than joining |
# |
Apr 19th 2017, 10:42 |
hmic |
Neon1024, order problem fixed? |
# |
Apr 19th 2017, 10:41 |
joop |
but i can not acces the data any other way |
# |
Apr 19th 2017, 10:41 |
joop |
the query is returning fine as showing the toArray method |
# |
Apr 19th 2017, 10:41 |
hmic |
just use crud and crudview and like 2 days of time and i get any 1.2 app would be rewritten *fg* |
# |
Apr 19th 2017, 10:41 |
Neon1024 |
Doubt it would be anyones choice! |
# |
Apr 19th 2017, 10:41 |
Neon1024 |
No, I imagine not |
# |
Apr 19th 2017, 10:41 |
cobra-the-joker |
Neon1024: not my choice :( |
# |
Apr 19th 2017, 10:40 |
hmic |
the app cannot do much anyways, so rewrite to 3.4 would be the thing :D |
# |
Apr 19th 2017, 10:40 |
Neon1024 |
Upgrade to 1.3 ? :p |
# |
Apr 19th 2017, 10:39 |
dereuromark |
my memory gives up on my after ~3 years, but 10+ years is too much I am afraid |
# |
Apr 19th 2017, 10:39 |
Neon1024 |
Appropriate nickname I think cobra-the-joker ;) |