# |
Oct 5th 2016, 17:42 |
lorenzo |
Unfaiir did you read the migration guide? |
# |
Oct 5th 2016, 17:41 |
lorenzo |
ok |
# |
Oct 5th 2016, 17:41 |
keith |
Thanks @dereuromark Iâ??ll look into it |
# |
Oct 5th 2016, 17:41 |
Unfaiir |
lorenzo: I'm on 2.x still, just tyring to understand the folder changes in 3.x |
# |
Oct 5th 2016, 17:39 |
dereuromark |
keith: my tools plugin provides tokens which I use for this |
# |
Oct 5th 2016, 17:33 |
lorenzo |
bu what are you looking at? |
# |
Oct 5th 2016, 17:33 |
lorenzo |
the webroot is now outside `src` |
# |
Oct 5th 2016, 17:33 |
Unfaiir |
lorenzo: Inside the src folder I don't see the webroot folder, where has that gone? |
# |
Oct 5th 2016, 17:32 |
keith |
3.3.5 |
# |
Oct 5th 2016, 17:32 |
keith |
Is anyone aware of a forgotten password plugin for 3.5? |
# |
Oct 5th 2016, 17:30 |
lorenzo |
it is called `src` now |
# |
Oct 5th 2016, 17:30 |
Unfaiir |
Where is the app folder in 3.x? |
# |
Oct 5th 2016, 17:28 |
lorenzo |
Greezler how are you building the prepared statement? |
# |
Oct 5th 2016, 17:26 |
francky06l |
ypnos: seem no way to 'delete the object' .. I can force validate => false in the options .. but that will not avoid the Entity creation |
# |
Oct 5th 2016, 17:20 |
francky06l |
ypnos sorry it is triggerd |
# |
Oct 5th 2016, 17:15 |
francky06l |
ypnos: beforeMarshal of the associated models are not called I think, I have to do this in the main model ..right ? |
# |
Oct 5th 2016, 17:14 |
Greezler |
Is there a reliable way I can use a PHP array (of integers) as a condition in a prepared statement? |
# |
Oct 5th 2016, 17:01 |
ypnos |
you're welcome |
# |
Oct 5th 2016, 17:01 |
francky06l |
I will give a try, Thanks a lot |
# |
Oct 5th 2016, 17:01 |
francky06l |
I see, it's the "beforeValidate" of 2.x something like this .. |
# |
Oct 5th 2016, 17:00 |
ypnos |
instead of properties you would have addresses |
# |
Oct 5th 2016, 17:00 |
ypnos |
this would go into the User/Client table class |
# |
Oct 5th 2016, 16:59 |
ypnos |
this is what I do in a similar problem |
# |
Oct 5th 2016, 16:59 |
ypnos |
francky06l: https://gist.github.com/ypnos-web/af1f88fa18c148113cd4a88e495bb331 |
# |
Oct 5th 2016, 16:59 |
francky06l |
~help |
# |
Oct 5th 2016, 16:59 |
francky06l |
~ |
# |
Oct 5th 2016, 16:59 |
francky06l |
ok, super :_) |
# |
Oct 5th 2016, 16:58 |
ypnos |
francky06l: I have some example code for you |
# |
Oct 5th 2016, 16:58 |
ypnos |
but for this you would need to do 2x hasOne instead of one hasMany |
# |
Oct 5th 2016, 16:57 |
ypnos |
the other can be that you set a custom validator for the second association |
# |
Oct 5th 2016, 16:57 |
ypnos |
that is probably the best solution to your problem |
# |
Oct 5th 2016, 16:57 |
ypnos |
so you could throw out the second address in the request data if it is blank |
# |
Oct 5th 2016, 16:57 |
francky06l |
I know :-) First it contains errors for the second address (wich is blank) ... |
# |
Oct 5th 2016, 16:57 |
ypnos |
but you can work on the data before validation |
# |
Oct 5th 2016, 16:56 |
ypnos |
no I just mention that this is what the validation is doing |
# |
Oct 5th 2016, 16:56 |
francky06l |
So you suggest I should work on the request->data prior to "Entitize" them |
# |
Oct 5th 2016, 16:55 |
ypnos |
I assume is your concern is that a second, associated address entity would be created even if not necessary |
# |
Oct 5th 2016, 16:55 |
francky06l |
Basically I have 2 occurences of the Address Entity .. One of then can be blank (this ignored the validity rules of the Addresses table) .. |
# |
Oct 5th 2016, 16:55 |
ypnos |
the marshalling happens before creation of entities which means that validation rules do not care if the field in question is associated or not |
# |
Oct 5th 2016, 16:54 |
ypnos |
with secondary fields I just mean you say you have some fields (second address) that are subject to validation but need not be present. thats all I meant |
# |
Oct 5th 2016, 16:54 |
ypnos |
yeah so the thing is |