Hi,

to those who are experienced in django: i just want to avoid making
mistakes at the database level.

intro: I have an existing produkt p (class produkt) in the database. It
has a few other keys to the table attribute. So attribute (class
attribute) has a ForeignKey to produkt.

todo: Take the object p and create an new copy to the produkt table,
but do not create new attribute s. The new object p_new should only
hold the same references to the attribute table als p.

question: How can i do this? Normaly ForeignKey ist just a Reference.
So holding only references in p_new won't be the problem. But how can I
dublicate p in the table?

p.id = ??? (max_id in table + 1 or NOT SET  ----> but how can i do
this)
p.save()

Daniel


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" 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/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to