DavidA wrote:
> The identity value is set in the new instance once you call save so you
> can simply do this:
>
>     p = Property(sq_feet=2300, ...)
>     p.save()  # now p.id is set
>
>     a = Ad(property=p, ...)
>     a.save()
>
> The equivalent of the @@Identity trick is handled during 'save' via the
> db backend's get_last_insert_id function which is database-dependent.
> -Dave

Thanks Dave, that should do the job!

Lorenzo


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to