Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: Re[eclipselink-users] freshing Trigger Based Columns

Thanks, we ended up using @ReturnInsert and @ReturnUpdate , worked great.

./tch



On Tue, Dec 15, 2009 at 2:28 PM, James Sutherland <jamesssss@xxxxxxxxx> wrote:
>
> You can use the ReturningPolicy for this on Oracle (@ReturnInsert).
>
> Or you can call EntityManager.refresh() on the object after insertion.  Or
> you could invalidate it in the cache so it is refresh when it is next
> accessed.
>
> You could also initialize the created_on in Java, instead of in the
> database, as it would be more efficient than querying back the data.
>
> I would not recommend alwaysRefresh, this will only cause the next query to
> refresh (and not primary key queries).  If you want to disable the cache,
> set shared=false instead.
>
>
> tch wrote:
>>
>> Quick question -- I've got an insert trigger to set created_on, how do
>> I let Eclipse Link know so it can refresh this from the database after
>> an insert rather than thinking it's null. Do i have to manually call a
>> refresh after my persist?
>>
>> ./tch
>>
>>
>
>
> -----
> http://wiki.eclipse.org/User:James.sutherland.oracle.com James Sutherland
> http://www.eclipse.org/eclipselink/
>  EclipseLink ,  http://www.oracle.com/technology/products/ias/toplink/
> TopLink
> Wiki:  http://wiki.eclipse.org/EclipseLink EclipseLink ,
> http://wiki.oracle.com/page/TopLink TopLink
> Forums:  http://forums.oracle.com/forums/forum.jspa?forumID=48 TopLink ,
> http://www.nabble.com/EclipseLink-f26430.html EclipseLink
> Book:  http://en.wikibooks.org/wiki/Java_Persistence Java Persistence
> --
> View this message in context: http://old.nabble.com/Refreshing-Trigger-Based-Columns-tp26779444p26800316.html
> Sent from the EclipseLink - Users mailing list archive at Nabble.com.
>
> _______________________________________________
> eclipselink-users mailing list
> eclipselink-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/eclipselink-users
>


Back to the top