Oleg Broytmann wrote:
> Hello!
> 
> On Thu, Oct 19, 2006 at 03:57:44PM -0300, Johan Dahlin wrote:
>> I found a couple of problems when using more than two layers of inheritance,
>> attaching an updated patch.
> 
>    The test is good, but the patch is not. We do not need to copy
> _SO_prepareSelectBy(), instead, InheritableSQLObject.selectBy() must handle
> foreign keys itself.
>    Which it now does. See the commit 2039. Thank you for the inspiration
> and the tests!

Thanks, your code seems quite a bit smaller indeed!

I forgot to include a test which tests 3 levels off inheritance that the
following code was needed for:

+        tableName = cls.__name__
+        for table in tables:
+            for c in [table.q.childName == tableName,
+                      table.q.id == cls.q.id]:
+                clauses.append(conn.sqlrepr(c))
+            tableName = table.__name__

Let's see if I can come up with a good test for that.

Johan


-------------------------------------------------------------------------
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

Reply via email to