On 8/3/06, naduc <[EMAIL PROTECTED]> wrote:

I failed to create an object with primary key consists of 2 column, but
there is no guide on this matter.
For example, class named Person with primary key to unique identify
object is name and birthday (this is an example, not a realistic case).
It looks like SQLObject only support object with only one column
identified as primary key.
Is there anyone encounter this matter?

SQLObject is an Object Relational Mapper, it's goal is not to create SQL but to store Objects, so it doesn't cares about normal SQL contrains, in fact there is no obvious way to create a PRIMARY KEY, since it creates one for you. So either you stop thinking like it's SQL or you move to SQLAlchemy which does gives you more "freedom" when managing the actual queries DB.

maybe you want to take a look at http://ianbicking.org/docs/sqlobject-presentation/sqlobject-and-database-programming.html







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