On Wed, Aug 12, 2009 at 09:28:33AM +0100, Jos?? Miguel Pereira Tavares wrote: > sqlobject/main.py: > 1469 if join.soClass.__name__ > join.otherClass.__name__: > 1470 continue > 1471 joins.append(join) > > What this lines seam to do is stop any Many-to-Many relations where the > first class as a "lower" name than the second on. > > Is this intended? If so why?
To prevent the intermediate table to be created twice. > Example snipet: Works for me (without VirtualMachine class): Capability.createTable() Target.createTable() prints 1/QueryR : CREATE TABLE capability ( id INTEGER PRIMARY KEY, name TEXT, description TEXT ) 2/Query : CREATE TABLE capability_target ( capability_id INT NOT NULL, target_id INT NOT NULL ) 2/QueryR : CREATE TABLE capability_target ( capability_id INT NOT NULL, target_id INT NOT NULL ) 3/Query : CREATE TABLE target ( id INTEGER PRIMARY KEY, name TEXT, i_p TEXT ) Target.createTable() Capability.createTable() prints 1/QueryR : CREATE TABLE target ( id INTEGER PRIMARY KEY, name TEXT, i_p TEXT ) 2/QueryR : CREATE TABLE capability ( id INTEGER PRIMARY KEY, name TEXT, description TEXT ) 3/Query : CREATE TABLE capability_target ( capability_id INT NOT NULL, target_id INT NOT NULL ) Ok? Oleg. -- Oleg Broytmann http://phd.pp.ru/ p...@phd.pp.ru Programmers don't die, they just GOSUB without RETURN. ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ sqlobject-discuss mailing list sqlobject-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss