Re: Multi-Table Inheritance and fixtures

2008-05-20 Thread Ziling Zhao
In addition, it seems like my patch works for sqlite and mysql, but will fail under postgres. On Tue, May 20, 2008 at 3:09 PM, Ziling Zhao <[EMAIL PROTECTED]> wrote: > My fix was to simply set the parent's primary key attribute inside of th > child's data, which worked

Re: Multi-Table Inheritance and fixtures

2008-05-20 Thread Ziling Zhao
this makes sense to me)? On Mon, May 19, 2008 at 2:52 PM, Ziling Zhao <[EMAIL PROTECTED]> wrote: > Well, the main problem with the parent table being saved independently of > the children tables is that you could have a fixture that only had the > children, seperate from the parents. So

Re: Multi-Table Inheritance and fixtures

2008-05-19 Thread Ziling Zhao
to fix it in the deserialization part by setting the parents pk before converting it to an object. This should hopefully make it save/update correctly. On Sat, May 17, 2008 at 12:41 PM, AmanKow <[EMAIL PROTECTED]> wrote: > > On May 15, 6:15 pm, "Ziling Zhao" <[EMAIL PROTE

Re: Multi-Table Inheritance and fixtures

2008-05-15 Thread Ziling Zhao
;, "fields": { "parent_ptr": 2, "name": "child1", "number": 1 } } However, if a OneToOneField is defined, that "parent_ptr" is lost and the only fields that remain are "name" and "number". Is this expe

Re: Multi-Table Inheritance and fixtures

2008-05-15 Thread Ziling Zhao
data, > always specifying that only the child be saved (it wouldn't hurt to > specify it everywhere loaddata saves as it would be ignored where it > wasn't pertinent) might just be the fix. > > Wayne > > > -- ~Ziling Zhao --~--~-~--~~~-

Re: Multi-Table Inheritance and fixtures

2008-05-13 Thread Ziling Zhao
ter the save: > >>> r = Restaurant.objects.get(pk=r.pk) > > If indeed there is some sort of transactional issue in loaddata, > always specifying that only the child be saved (it wouldn't hurt to > specify it everywhere loaddata saves as it would be ignored where it > wasn'

Re: Multi-Table Inheritance and fixtures

2008-05-09 Thread Ziling Zhao
aware of any elegant solutions. On Thu, May 8, 2008 at 9:53 PM, Russell Keith-Magee <[EMAIL PROTECTED]> wrote: > > On Fri, May 9, 2008 at 7:17 AM, Ziling Zhao <[EMAIL PROTECTED]> wrote: > > I filled a bug here about multi-table inheritance problems and fixtures: > >

Multi-Table Inheritance and fixtures

2008-05-08 Thread Ziling Zhao
sense in .save() but I'm unsure of that. Does fixing it in model.save() makes the most sense? Thanks for your input. -- ~Ziling Zhao --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers&quo