Re: Model inheritance problem, inherited instances

2009-07-22 Thread Peter Cicman
Hi Rodrigue, thats exactly what i tried as a first, but unfortunately something like this doesn't work. And seems there isn't any "standard" workaround for this. Solutions are: 1.) call raw sql for creating record in B table, 2.) copy all local_fields values from a to b, after this save works..

Re: Model inheritance problem, inherited instances

2009-07-21 Thread Rodrigue
If you look here http://docs.djangoproject.com/en/dev/topics/db/models/#id7 you'll see that multi-table inheritance is handled at the db level "via an automatically-created OneToOneField". This means that an instance of B has a foreign key to an instance of A. At the model level, there should be

Model inheritance problem, inherited instances

2009-07-20 Thread Peter Cicman
Hi, i didn't found noting about it in docs, so i'll try to ask, first explanation, i have: class A(models.Model): name = models.CharFiled(, required=True) . class B(A): I have an existing instance of A, say `a` and i "want to make" instance of b out of it. i'm