[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
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=weij7g5RGYNG3lBnkkWDGyFJrpmAcdpvb76jjlBBtAQ=; b=ne0h2BcPw3StrI9nSveQdvMKEk2yVM2facKTb/vPW9gtA2dJUZw6F4rd8jXTgZtEiZ IaG3NigVk5bSiwHmrcTW1/Z5a/KS/lcxqdJ7ePTod/r+rmAaNeKpA7otK+ec0z9QKe0J imePru14+8VRi7q0QL+vIaN6nu58nfmw6U86DlwBUHleGtmy8TjJ/UL42L73b2ic0D7C QAS9ZfKP/dZi9WPUiJJrtEAUAcId7o1ZYz6oWut9Eq1MTVYGS1WxlG44ijDZVZgIrvzz EQgtsmWSxLmP27ioTgnHw8GZa+7R4vlhGXfb9bzBrLyxGmdfXN8cy9kc1w5WNfMM7VmS 2idg==
- 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.).