Wednesday, December 26, 2012

Re: Database records being overriden with a multi-table inheritance schema

Thanks for the reply. I omitted my entire schema i should had mentioned that i have the models Seller, Supervisor (which is a seller and supervises other sellers) and Manager and the seller can be a Person and LegalEntity too that is why i didn't made Person or LegalEntity inherit from Customer because not all Persons or LegalEntities are customers. 

Em quarta-feira, 26 de dezembro de 2012 13h49min39s UTC-2, Gerald Klein escreveu:
It seems like you have the same idea recurring twice in this model. This IMHO doesn't require multiple inheritance. I would call commoninfo customer with it's fields and inherit django user then Person and LegalEntity inherit customer (which inherits django user) and add on their specific fields and skip the PersonCustomer and the LegalEntityCustomer. 

Customer would inherit the django userid, and so then would person and legalentity. They could still be identitied with an 'is a' customer' or 'is a' Person or legal entity. 

hope this helps

--jerry

On Wed, Dec 26, 2012 at 7:50 AM, Marcelo Mendes Pereira <mpmar...@gmail.com> wrote:
Customer



--

Gerald Klein DBA

Cont...@geraldklein.com

www.geraldklein.com

geraldklein.wordpress.com

j...@zognet.com

708-599-0352


Arch Awesome, Ranger & Vim the coding triple threat.

Linux registered user #548580 


--
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/MBIkIAxr09IJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment