me as the most counter-intuitive thing ever. An empty relation should
be completely empty. If this is now the case with belongsTo (I haven't
tested), then that seems to be a step backwards.
On Mar 24, 4:19 pm, RobertMeisner <rob...@catchit.pl> wrote:
> has something changed in ver 1.3 coresponding to how empty relations
> are presented?
>
> Whenever i use 0 or null as foreign-key i get something like (so its
> same as it's always been with hasOne relations):
>
> [Webpage] => Array
> (
> [id] => 1
> [created] => 2008-04-17 15:06:22
> [modified] => 2010-03-24 16:43:57
> [name] => Home Webpage
> [myforeign_id]=>0
> )
> [Myforeign] => Array
> (
> [id] =>
> [created] =>
> [modified] =>
> [name] =>
> )
> I believe in previous versions array would look more like:
> [Webpage] => Array
> (
> [id] => 1
> [created] => 2008-04-17 15:06:22
> [modified] => 2010-03-24 16:43:57
> [name] => Home Webpage
> [myforeign_id]=>0
> )
> [Myforeign] => Array
> (
> )
>
> What i believe does make more sense.
>
> So here comes next question: How should i check if relation is empty?
> empty($arr[Myforeign][id])???
Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
To unsubscribe from this group, send email to cake-php+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.
No comments:
Post a Comment