[sqlalchemy] Re: Mapping to views

2008-10-24 Thread Michael Bayer
On Oct 24, 2008, at 3:28 PM, john.goodleaf wrote: > > It looks like it might be easier to define a Table object using the > view, specifying a PrimaryKeyConstraint and then using the mapper > function to tie it to a class. Do you think this would work? that's exactly how it would work, you jus

[sqlalchemy] Re: Mapping to views

2008-10-24 Thread john.goodleaf
It looks like it might be easier to define a Table object using the view, specifying a PrimaryKeyConstraint and then using the mapper function to tie it to a class. Do you think this would work? Would I need to write a properties argument to the mapper? Apologies if these are stupid questions. I

[sqlalchemy] Re: Mapping to views

2008-10-24 Thread Michael Bayer
On Oct 24, 2008, at 11:41 AM, john.goodleaf wrote: > > So here's the problem. I am faced with two legacy systems outside my > control. One is SQL Server and the other is Oracle. In both only views > are exposed to me and I don't anticipate that changing. > > I'd like to map these views to object