I'm using SQLObject-0.7.1dev_r1675-py2.4.egg with
When running tg-admin sql (sql|create) I get notice the
RelatedJoin intermediate tables are only created when
the table with the "lowest sorted" name is processed
even if only the "highest sorted" name has a RelatedJoin.
filename = UnicodeCol()
fileType = StringCol()
sha1HexDigest = StringCol(length=40, alternateID=True)
# NO related join here!
class Project(SQLObject, HelperClassNotSqlObject):
# Force SQLObject to create the intermediate
# project_dumb_file table when looking at our
# files RelationalJoin instead of waiting to
# create it until it finds the projects
# in DumbFile (which dows not exist). Our table
# be lexiographically smaller than DumbFile
# a < d -> aproject < dumb_file
table = "aproject"
_defaultOrder = 'projectNumber'
projectNumber = StringCol()
files = RelatedJoin("File")
description = UnicodeCol(default="")
I do not want a relation from file to project because
many classes has files and I do not want File to have
relations to all these classes when looking at classes
related to a file is not needed but looking at files
related to a project is wery much needed.
Log in to post a comment.