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

Hi Andreas,

  As James mentions, using the current functionality set, your best best is to use a refresh.

  As for PostGres, you are right, our PostGreSQLPlatform has should be able to take advantage of the equivalent feature in PostGres.

-Tom
 
On 16/08/2013 5:20 AM, Andreas Joseph Krogh wrote:
Hi all.
 
I'm having the same issue as this guy: http://www.eclipse.org/forums/index.php/t/368890/
 
I'm having fields in my @Entity which are generated by the DB as insert-time and I need to map them.
 
In Hibernate it's possible using it's @Generated annotation:
@Column(name = "id", nullable = false, unique = true, updatable = false, insertable = false)
@org.hibernate.annotations.Generated(org.hibernate.annotations.GenerationTime.INSERT)
var activityId: java.lang.Long = null
Does EL has something similar?
 
BTW: The blog-post mentions Oracle is the only supported platform supporting the "returning ..." syntax in SQL INSERT/UPDATE. PostgreSQL supports this too.
 
Thanks.
 
--
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