I am using a one-to-one relationship (I know I know...), and i'm using
the Super() to create the record in one of my save() routines.

My question is, how do I check to see if a record is already linked to
an existing 1-1 record?

For example

Model A():
   Field 1 = charfield()
   field 2 = charfield()

   def save(self):
      Super(modelA, self)

                <<<  how can I tell if i have already created a Mb?

      Mb = ModelB()
      Mb.ModelA = self
      Mb.save()

Model b():
   onetoonerecord = models.onetoonefield(modelA)
   field A = charfield()
   field B = charfield()


Basically, in the save() routine, is there a way to check if the 1-1
is already there?

thanks

John

--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to