18 Feb
2005
18 Feb
'05
9:36 a.m.
Hi all. I'm little surprised by the possibility to insert non-persistent instances inside persistent object. I mean: class Alfa: def __init__(self): self.x = 1 self.y = 2 class Beta(SimpleItem): def __init__(self): self.id = 'anId' self.anAlfa = Alfa() I always understood that I could not put Alfa instances inside a Beta class, because the ZODB machinery did not understood how to pickle them. But I did some experiments recently, and it looks like the above example should work. Could anyone provide some insight on this topic? Thanks Regards Marco