well if my user goes to his profile page, and i execute the Profile-
>read(), he won't have a profile to access even if it's blank.
On Aug 21, 11:06 am, teknoid <[EMAIL PROTECTED]> wrote:
> Yes, it's possible with saveAll()...
>
> That being said, why would you want to create a record with no data?
>
> On Aug 21, 4:28 am, rocket <[EMAIL PROTECTED]> wrote:
>
> > is there a way get hasOne to automatically generate a entry for me on
> > a table? for instance, i have user hasOne profile, so everytime I
> > create a user i'd like it to create a blank profile entry. Is that
> > possible?
>
> > Currently my relationship is set like this but it doesn't auto-create
> > for me:
>
> > class User extends AppModel
> > {
> > var $name = 'User';
> > var $hasOne = array('Profile' =>
> > array( 'className'
> > => 'Profile',
> >
> > 'conditions' => '',
> > 'order'
> > => '',
> > 'dependent'
> > => 'true',
> >
> > 'foreignKey' => 'user_id'
> > )
> > );}
>
> > ?>
>
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---