Hi All,

I've been using SQLObject for awhile now and quite liking it, but
something which causes me a lot of pain is the way the
.dropJoinTables, .createJoinTables and .clearJoinTables methods of the
SQLObject class operate.

Currently all three methods decide whether to act on an intermediate
table using:

if join.soClass.__name__ > join.otherClass.__name__:
                continue

This works well if both tables in the join are being dropped, created
or cleared but causes all kinds of headaches if you're only acting on
one of the tables.  For example, I currently have an application which
needs to clear all data from a table and associated intermediate
tables before reimporting data.  I can't (at least not without writing
my own versions of the methods).

One possibility is to add another option to the methods which causes
them to act on all intermediateTables.  This has the advantage of
being backwards compatible and solving the immediate problem.

However, I'd rather completely rewrite the methods so that they
default to acting on all intermediate tables and check to see whether
the tables exist before deciding on what to do.  The reason I'm
advocating this more drastic action is that the current implementation
makes it possible to break an application which uses SQLObject by
changing the name of a class (which seems completely wacked :).

I'm happy to write the changes, but obviously that's pointless if no
one else wants them.  :) Comments? Thoughts?

Schiavo
Simon
--
oooooooooooooooooooooooooooooooooooooooooo
[ hodgestar.za.net ]
In the end, we all choose our own morality.
oooooooooooooooooooooooooooooooooooooooooo


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642
_______________________________________________
sqlobject-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to