Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] Entity isn't persisted to database

Hi,

If I understand you correctly then em.persist is wrong for an entity
that has been merged back into the managed state. persist is used only
for new entities that have not yet been saved in the database.

Regards,

Bernard


On Tue, 28 Aug 2012 00:50:48 -0700 (PDT), you wrote:

>hi @all, did anyone experience following scenario: 
>
>A Entity is detached.
>With merge is brought back to the persistence context, the result entity of
>merge is being persisted with em.persist(entity). 
>I make a explicit flush() afterwards. The changes aren't written to the
>database. 
>
>After I restart my application server, trigger the process again, it is
>being persisted. 
>I have no clue, if it is EclipseLink that causes that problem. 
>Using JTA mode in Glassfish 3.1.1. 
>Current EclipseLink Version is 2.3.0.
>
>The EJB is working fine, but sometimes this case happens. No errors are
>thrown by the way. I will write some arquilian test to narrow it down.
>Anybody who have a clue or hint for me for described issue, would be kindly
>appreciated.



Back to the top