[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [eclipselink-users] Cache issue with EclipseLink?
|
Are you using a Set or a List? You say list, so I don't think your issue is
related.
If it is a Set and you change it to a List does the issue go away?
What is the code for your tests and your classes.
jama wrote:
>
> The testing scenarion is following. I have TripLocalInfo in
> @ManyToOne(optional=false, cascade=CascadeType.PERSIST) to TripGeneralInfo
> @OneToMany(mappedBy="generalInfo", cascade=CascadeType.ALL).
>
>
> I have one junit test method in which I create a new TripLocalInfo and
> related TripGeneralInfo info in one transaction, then remove tripLocalInfo
> in second transaction.
>
> In the second junit test I find the TripGeneralInfo instance, create two
> related TripLocalInfo and store them.
> The assertEquals("Two triplocalizedinfo must be saved",
> 2,tripGeneralInfo.getLocalizedInfo().size());
> sometimes fails, because an extra TripLocalInfo instance was fetched
> including extra TripLocalInfo which should be removed in last transaction,
> so the getLocalizedInfo().size() sometimes returns 3.
>
> What I wonder, that if I look to db tables - everthing is OK there. Just
> two rows are stored even if the java list size was 3.
>
>
>
-----
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/Cache-issue-with-EclipseLink--tp22440339p28971942.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.