Hello,
I have the following tables:
class Package(SQLObject):
name = StringCol(alternateID=True, length=255)
[...]
class TrackerPackage(SQLObject):
[...]
info = ForeignKey('Package')
tracker = ForeignKey('Tracker')
bugs = RelatedJoin('Bug')
class Bug(SQLObject):
[...]
packages = RelatedJoin('TrackerPackage')
status = RelatedJoin('BugStatus')
class BugStatus(SQLObject):
name = StringCol(alternateID=True, length=40)
bugs = RelatedJoin('Bug')
class Tracker(SQLObject):
[...]
packages = MultipleJoin('TrackerPackage')
flags = MultipleJoin('CustomFlagDefinition')
At the moment, i'm doing something like that :
tracker.get(1)
for package in tracker.packages:
print package.info.name
[...]
for bug in package.bugs:
print bug.bugNumber
for status in bug.status:
print status.name
I wonder if there is a way to do a *JOIN* or someting else for avoiding
too much SQL requests. I can't figure out how i could do that with
sqlobject.
Regards,
Arnaud Fontaine
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
sqlobject-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss