Bugs item #1522366, was opened at 2006-07-14 00:34
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1522366&group_id=74338
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: General
Group: SQLObject release (specify)
Status: Open
Resolution: None
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: No intermidiate table crated with one way RelatedJoin
Initial Comment:
I'm using SQLObject-0.7.1dev_r1675-py2.4.egg with
Turbogears 0.9a6
When running tg-admin sql (sql|create) I get notice the
following misfeature:
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.
class File(SQLObject):
filename = UnicodeCol()
fileType = StringCol()
sha1HexDigest = StringCol(length=40, alternateID=True)
# NO related join here!
class Project(SQLObject, HelperClassNotSqlObject):
class sqlmeta:
# Force SQLObject to create the intermediate
# project_dumb_file table when looking at our
project
# files RelationalJoin instead of waiting to
# create it until it finds the projects
RelationalJoin
# in DumbFile (which dows not exist). Our table
must
# 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.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1522366&group_id=74338
|