[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [eclipselink-users] Order of persist operations
|
Le 17-01-13 14:55, Deyan Tsvetanov a écrit :
So you don't see a problem that eclipselink randomises the order of the db operations when it can't determine it from the relationships ?
No, there isn't any. It's spec compliant. You can't base production code
on what some version of an implementation appears to do, the reference
is the specification.
I do see a problem with the requirement of having to have inserts "in
natural order". What purpose does that serve? It's not even sure the
database will return them in this order anyway. It could break anytime,
if you compact your db or after some reindexing for example. This is
just bad practise, you should really fix your implementation.
Regarding your mapping, you could perfectly map your object graph in a
OO way. But that means using the JPA spec in a correct way (e.g.
maintaining both sides of bidirectional relationships, if they need to
be mapped anyway, etc.).
Yannick