Skip to main content



      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] Fri, 07 January 2011 22:33 Go to next message
Eclipse UserFriend
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: Fri, 07 January 2011 22:41] by Moderator

Re: Problem using a Converter to convert to list [message #647984 is a reply to message #647720] Mon, 10 January 2011 12:04 Go to previous message
Eclipse UserFriend
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?
Previous Topic:EclipseLink-8034 error
Next Topic:Deadlock during serialization of entities
Goto Forum:
  


Current Time: Thu Jul 10 00:11:32 EDT 2025

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

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

Back to the top