On Sun, May 21, 2006 at 10:14:38PM +0200, [EMAIL PROTECTED] wrote:
> class Orders_entries(SQLObjects):
>    class meta:
>       table = "current_orders_entries"
>    order = ForeignKey("current_orders")
>    date = DateTimeCol()
>    ...
> 
> # class Orders_entries_archive, only redefine the different attributes
> class Orders_entries_archive(Orders_entries):
>    class meta:
>       table = "orders_entries_archives"
>    order = ForeignKey("orders_archive")
> 
> But, I get an error message :
> The class Orders_entries_archive already has a column orderID (<ForeignKey
> 40813b4c order>), you cannot add the column (<ForeignKey 40813cec order>)

class Orders_common(SQLObjects):
   date = DateTimeCol()
   ...

class Orders_entries(Orders_common):
   class meta:
      table = "current_orders_entries"
   order = ForeignKey("current_orders")

class Orders_entries_archive(Orders_common):
   class meta:
      table = "orders_entries_archives"
   order = ForeignKey("orders_archive")

Oleg.
-- 
     Oleg Broytmann            http://phd.pp.ru/            [EMAIL PROTECTED]
           Programmers don't die, they just GOSUB without RETURN.


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