cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Huss <johnth...@gmail.com>
Subject Re: Order of insert/update/delete operations
Date Tue, 01 Aug 2017 22:54:56 GMT
You're looking for the ashwood entity sorter
On Tue, Aug 1, 2017 at 5:40 PM Lon Varscsak <lon.varscsak@gmail.com> wrote:

> I think in EOF I handled this with a custom ordering of operations, where I
> had a master list of entities in the order I wanted operations to perform
> (and then reversed them for deletes).  Maybe there’s some way to do this
> with Cayenne, but it’s not immediately evident to me where.
>
> -Lon
>
> On Tue, Aug 1, 2017 at 3:37 PM, Lon Varscsak <lon.varscsak@gmail.com>
> wrote:
>
> > Hey guys, so Cayenne does db operations in insert/update/delete
> > order…which makes sense in most cases.  But in Sybase I don’t have
> deferred
> > constraints (it’s not an option) and if I delete an object and then
> > recreate it will the same primary key I end up with a database error
> > because it tries to insert a duplicate row into the database.
> >
> > Originally I had changed the order of operations in my fork to
> > update/delete/Insert which solves this problems and works in all cases
> > (that I use) except for one.  That’s where you need to insert a row to
> get
> > it’s id (identity) which would then be used in an update operation for a
> FK.
> >
> > It’s possible I’m the only one that uses Sybase, but just looking for
> some
> > thoughts on how I could go about solving this.  I can’t think of a
> > straightforward case.
> >
> > Thanks,
> >
> > Lon
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message