The "primary_key" collection seems to be empty. For example, I am reflecting the table "teachers", and the result of: len(teachers.primary_key) is 0.
The table is there, and is reflected apparently correctly. And teachers.indexes shows me a correct list of indexes. I'm not an expert in Oracle, so maybe this is consistent with the way the database is created. I can't change that, as it is for a commercial product. Are there any side effects if SQLAlchemy doesn't have a Primary Key for a table? On May 24, 8:59 pm, Michael Bayer <[email protected]> wrote: > On May 24, 2010, at 5:34 AM, Urko M. wrote: > > > Hi everyone, > > > I am starting out with SQLAlchemy, and I want to use it to reflect > > tables in an Oracle 10g database. > > > I have been successful in that, but it seems it is not reflecting the > > primary keys. Any ideas? > > Or any suggestion about how to check if the keys are getting reflected > > or not? > > you'd check the "primary_key" collection on the Table, > len(Table.primary_key). There's no issue I've seen before with PK columns > not reflecting on 10g. > > -- > You received this message because you are subscribed to the Google Groups > "sqlalchemy" 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 > athttp://groups.google.com/group/sqlalchemy?hl=en. -- You received this message because you are subscribed to the Google Groups "sqlalchemy" 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/sqlalchemy?hl=en.
