Hi all,

I am trying to model the following situation:

I have an entity (a committee), which is stored in a single table.
Mapping Committee object to this is trivial.

Defined in this table is a foreign key (type) which references the pk
of a table committee_type.

I wish to map Committee obj to the join between tbl_committee and
tbl_committee_type, something possible using join I think.

However, I also want to enforce the constraint that any type added to
a new committee object must be present in tbl_committee_type. I do not
wish to be able to add a type and have that added to the table by
sqlalchemy.

For example, if type "audit" already exists as the pk in
tbl_committee_type and I try to set type to "remun" on a new Committee
object and flush, I want it to fail.

I imagine this isn't too difficult, but at this stage, I cannot figure
out how to do it. Any help would be gratefully appreciated.

Rob C


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to