On Sun, Jul 10, 2022, at 11:36 PM, Carl Brewer wrote:
> On 11/07/2022 1:19 am, Mike Bayer wrote:
> > background on mapping ORM classes to reflected tables is at
> > https://docs.sqlalchemy.org/en/14/orm/declarative_tables.html#mapping-declaratively-with-reflected-tables
> >
> >
On 11/07/2022 1:19 am, Mike Bayer wrote:
background on mapping ORM classes to reflected tables is at
https://docs.sqlalchemy.org/en/14/orm/declarative_tables.html#mapping-declaratively-with-reflected-tables
background on mapping ORM classes to reflected tables is at
https://docs.sqlalchemy.org/en/14/orm/declarative_tables.html#mapping-declaratively-with-reflected-tables
and there are three general methods depending on your needs.
DeferredReflection is oriented towards explicit class setup, and
I'm reflecting a table into the ORM, that has no defined unique key, but
has two fields that when combined are unique - it's MySQL, but that
shouldn't matter.
Eg:
int userID and int groupId are non-unique, but when combined they are.
Can anyone point me at a simple example of how to do