[orm-devel] one2one - second

Werner F. Bruhin orm-devel@mailman.tux4web.de
Mon, 03 Mar 2003 17:59:25 +0100

Hi Diedrich,

Just tried something else.

p = ds.selectByPrimaryKey(parent, 1)
print p
print p.parent_data
print p.child
#print p.child.child_data

The p.child.child_data gives the error.

child2 = child(id=3, child_data="child2 data")
p.child = child2
print p.child.child_data

This one works, so problem is not with the class definition (i.e. 
original code  "child": one2one(child), is therefore correct, but 
problem is related to selectByPrimaryKey.

I think it is tea time again (don't think I am English, I am actually 
Swiss German), as I obviously am missing something.

See you