Hi! I'm having some strange behavior and I want to know if this is the
expected behavior, it's a bug or something else.

I have a model A related with belongs_to with model B. When I do a
find('all'), some A models have null the foreign key related with
table B, and this is the result:

Some model A register:
array(
    'model A' => array('field1modelA' => 'value', etc.,
'foreignKeyWithModelB' => null),
    'model B' => 'field1MOdelB'=>null, 'field2ModelB' => null, etc.,
all nulls)
);

What I want:
array('model A' => array('field1modelA' => 'value', etc.,
'foreignKeyWithModelB' => null);

I don't want an extra array if the related table register does not
exists :S I use this with xml helper and i get something ugly like:

<modelA att1=value att2=value foreignKeyWithModelB=null>
<modelB att1=null att2=null etc/>
</modelA>

That is ok when foreignKeyWithModelB is not null, but when is null
there's no related data and I dont want to show something like a model
with all null. There's a way to avoid this?

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 [email protected]
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to