Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Problem using a Converter to convert to list(List is cleared before converter is called)
Problem using a Converter to convert to list [message #647720] Sat, 08 January 2011 03:33 Go to next message
No real name is currently offline No real nameFriend
Messages: 1
Registered: January 2011
Junior Member
I have a list in an object as such:

	@Converter(name="rowConverter", converterClass=RowJsonSerializedObjectConverter.class)
	@Convert("rowConverter")
	private List<Row> rows;





When I attempt to save an instance of this class, it always has at least 1 Row. however when convertObjectValueToDataValue is called on my Converter impl, rows always has 0 rows. As far as I can tell, the last time I see the instance with the correct number of rows is this line code, in UnitOfWorkImp (line793 in r8635)
Object objectFromCache = getIdentityMapAccessorInstance().getFromIdentityMap(primaryKey, object.getClass(), descriptor);



where the local variable object has the correct number.

The object that is cloned and the object that is passed to convertObjectValueToDataValue always has an empty list of rows.

Anyone have any idea what's going on? How can I debug this further?

[Updated on: Sat, 08 January 2011 03:41]

Report message to a moderator

Re: Problem using a Converter to convert to list [message #647984 is a reply to message #647720] Mon, 10 January 2011 17:04 Go to previous message
James Sutherland is currently offline James SutherlandFriend
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

In what context is convertObjectValueToDataValue being called with 0 rows?

You say it is 1 for persist, so persist is working? What is not working, reading, refresh?

I would add an @Basic to the field, just to ensure it is being mapped as the correct mapping type, as List normally defaults to OneToMany.

On clone convertObjectValueToDataValue would be called with the shared cache object's value, which you seem to indicate is correct. Perhaps dump the stack trace in your convertObjectValueToDataValue to see where it is called from. Also print the value after the persist, and using a read-only query.

What EclipseLink version are you using, have you tried the latest release?


James : Wiki : Book : Blog : Twitter
Previous Topic:EclipseLink-8034 error
Next Topic:Deadlock during serialization of entities
Goto Forum:
  


Current Time: Thu Mar 28 16:32:17 GMT 2024

Powered by FUDForum. Page generated in 0.04598 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top