Constraints can get even more complex, like Oracle and PostgreSQL (perhaps others) allow deferrable constraints, which are nice, but MySQL will blow up immediately if a constraint fails even if it'll be satisfied by the end of the transaction.
On Fri, Jul 1, 2016 at 9:09 AM, Aristedes Maniatis <[email protected]> wrote: > On 1/07/2016 8:57pm, Andrus Adamchik wrote: > > > >> On Jun 30, 2016, at 11:04 PM, Aristedes Maniatis <[email protected]> > wrote: > >> > >> 1. The Cayenne model will need to have additional metadata about > database indexes and constraints. I've always liked that idea anyway but > lacked the time to work on it personally. It could open up interesting > interactions with projects like liquibase [1] > > > > We already have information about relationships (that are essentially FK > constraints). Why do we need to know about indexes for ordering purposes? > > I was just thinking about db constraints really. For example, a unique > index on a field (other than the PK) might need to be taken into > consideration if you were deleting and creating records. The delete has to > happen before the create, or they need to be coalesced into a single update. > > Ari > > > > -- > --------------------------> > Aristedes Maniatis > GPG fingerprint CBFB 84B4 738D 4E87 5E5C 5EFA EF6A 7D2E 3E49 102A >
