Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] PersistenceUnitUtil#getIdentifier(Object): should return generated ID after flush(), right?

I'm in the middle of a transaction.

I persist an entity whose ID is generated.

I call flush().

I verify that em.contains(entity).

I verify that entity.getMyIdentifier() is non-null and numeric (i.e. the ID generation worked).

I then say: em.getEntityManagerFactory().getPersistenceUnitUtil().getIdentifier(entity).

The result is null.

Is that by design?  Or should I file a bug?

Best,
Laird

--
http://about.me/lairdnelson

Back to the top