From: Ian B. <ia...@co...> - 2003-06-04 05:19:38
|
On Tue, 2003-06-03 at 22:07, Edmund Lian wrote: > I've found a couple of bugs in RelatedJoin... > > 1. If you're going to explicitly define a class for the mapping table, > you cannot use .createTable() to create tables on either side of the > join. This is because the RelatedJoin declaration forces SQLObject to > try to create the mapping (intermediate) table again, and this causes an > exception. You can put do createTable(createJoinTables=False). Otherwise it should create the join table when you create the table that's alphabetically first (so both createTables don't create the shared table). Is that not working for you? > > 2. When the mapping table table is used to map two or more many:many > relationships, the presence of null values in the mapping table causes > an exception. Example test case: Why would there by a null value? Each row is a relationship, so a row with a null should just be deleted. Maybe it's because you are using it all funny like, with a triple join... hmm... well, I made a change that I think should work. I also got rid of the funny behavior you got when you accidentally instantiated an object with an id of None. Ian |