[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [eclipselink-users] Cache.evict() after persist, or how?
|
Please include the stack trace.
Bálint Kriván wrote:
>
> Thanks, will try the getReference() stuff, but when i'm setting @Cache
> annotation shared attribute to false, instead of type=NONE, I'm getting
> strange exceptions:
>
> "unknown state or association field [myField] of class
> [com.example.MyEntity]"
> but it works with type=NONE
>
> and:
> "A non-read-only mapping must be defined for the sequence number field."
>
> So what is this? I'm sure that I'm getting wrong something, but what?
> Thanks
> for guiding me!
>
> On Wed, Nov 17, 2010 at 3:30 PM, James Sutherland
> <jamesssss@xxxxxxxxx>wrote:
>
>>
>> Setting the reference is the best way to resolve this.
>>
>> However, it is also possible to have an insert/transaction not update the
>> shared cache. To do this you just need to call flush() and then clear()
>> before commit(). Then the inserted objects will not be added to the
>> shared
>> cache. This is sometimes useful for large batch insertions.
>>
>> Also, BTW, to disable the cache set shared=false do not set type=NONE.
>>
>>
>
>
-----
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
Blog: http://java-persistence-performance.blogspot.com/ Java Persistence
Performance
--
View this message in context: http://old.nabble.com/Cache.evict%28%29-after-persist%2C-or-how--tp30211338p30297105.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.