[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [eclipselink-users] Order of persist operations
- From: Yannick Majoros <yannick.majoros@xxxxxxxxx>
- Date: Thu, 17 Jan 2013 17:43:48 +0100
- Delivered-to: email@example.com
- User-agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:17.0) Gecko/20130107 Thunderbird/17.0.2
Le 17-01-13 14:55, Deyan Tsvetanov a écrit :
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.
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 ?
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.).