Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] DB-generated values as properties on JPA-entity

Seems pretty natural to me: the value is generated by INSERT statement, so until INSERT statement is executed there is no value.
Identity (in SyBase, MS SQLServer etc) works exactly the same way.

On 8/17/2013 1:09 PM, Andreas Joseph Krogh wrote:
På lørdag 17. august 2013 kl. 03:40:53, skrev Andrei Ilitchev
<andrei.ilitchev@xxxxxxxxxx <mailto:andrei.ilitchev@xxxxxxxxxx>>:

    Try removing "insertable = false"

Thanks, that "kind of" works; The Entity isn't populated with the value
until after TX-commit (because the INSERT statement isn't executed until
flush() or commit). It seems that one has to flush() the EM for this to
get populated and that is kind of fragile.
Any thoughts on this?
--
Andreas Joseph Krogh <andreak@xxxxxxxxxxxx>      mob: +47 909 56 963
Senior Software Developer / CTO - OfficeNet AS - http://www.officenet.no
Public key: http://home.officenet.no/~andreak/public_key.asc


_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users



Back to the top