Hi,
I read the documentation and it briefly mentions SingleJoin, but gives
no example.
I tried to use ForeignKey in the referenced class and SingleJoin in the
primary class, but I get this error when retrieving.
AttributeError: DataRow instance has no attribute 'processRowID'
My classes are simple.
class DataRow(SQLObject):
type = StringCol()
data = BLOBCol(length=2**24)
text = UnicodeCol()
row = ForeignKey('ProcessRow')
class ProcessRow(SQLObject):
path = StringCol()
status = StringCol()
data = SingleJoin('DataRow')
r = ProcessRow(path='here',status='loading')
datar=DataRow(data=d,type='binary',text='',row=r)
I'm not sure how to set the 'data' attribute for a ProcessRow since
both classes refer to each other. The DataRow SQL entry has a correct
row_id column set, but when I try to read it back like this, gives
error.
r = ProcessRow.get(1)
print "STATUS:"+r.status
print "DATA:"+r.data.type <<<<< generates error
thank you.
Darren
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
sqlobject-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss