Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.
  • Root
  • » Django
  • » Multi-Table inheritance save problem [RSS Feed]

#1 Dec. 20, 2010 18:55:20

s.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Multi-Table inheritance save problem


Hi,
I have a rather complicated scenario.

I have two models A and B.

I have a third Class C which inherits both A and B.

I am now overriding the save method of class C using super.save

Now an object A is added to the database.

However when the save method of B is called it fetches the id field of
Model A.

So the id field of both my models A and B is always duplicate. However
the problem is that there are many other sources by which my model B
is created. Hence many times my model B is just updated( as an object
with same id already exists) when it should have been created.

Please Help.

Shitiz

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

  • Root
  • » Django
  • » Multi-Table inheritance save problem [RSS Feed]

Board footer

Moderator control

Enjoy the 17th of August
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support