First of all let me say yes I know that the idea for SQLObject is Object to table equivalence but I have this idea and I need to know if it's posible to implement it this way.

If I have tables X and Y which contain data from two diferent sources (other aplication for example, or a dump from another database) and I want to load them both into SQLObject the normal thing will be to create class A and B that map to table x and y. Now what if I want to manage those 2 tables in my logic as a single Object. Could I do something like this

#seudo code not python below
class C(SQLObject):
  field1=x.field1
  field2=y.field2
  filed3=x.field3
  field4=somefunction(field3)

I know I could create C as a class that doesn't extends SQLObject and map it's values to A and B's fields but that seems a little ugly to me, not to mention I have to load A and B all the time even if I wont use them.


how about SQLAlchemy or other product?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/turbogears
-~----------~----~----~----~------~----~------~--~---

Reply via email to