[hibernate-issues] [Hibernate-JIRA] Created: (HHH-3259) org.hibernate.collection.PersistentIndexedElementHolder.readFrom class cast problem
Pascal P. Pochet (JIRA)
noreply at atlassian.com
Thu May 1 09:12:33 EDT 2008
org.hibernate.collection.PersistentIndexedElementHolder.readFrom class cast problem
-----------------------------------------------------------------------------------
Key: HHH-3259
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3259
Project: Hibernate3
Issue Type: Bug
Components: core
Affects Versions: 3.2.6
Reporter: Pascal P. Pochet
in "public Object readFrom(ResultSet rs, CollectionPersister persister, CollectionAliases descriptor, Object owner)"
the cast to NullableType at following line
>>>> final String index = ( (NullableType) indexType ).toXMLString( indexValue, factory );
causes a class cast exception if the entity contains an attribute defined by an user type when converting to textual representation
the dom4j.Element obtained from a EntityMode.DOM4J session.
In that situation the indexType is a CustomType which doesn't inherit from NullableType.
Solution could be to make "toXMLString" (and other xml-serialization related functions) member of an interface that the subclasses of AbstractType should implement
or to move them to AbstractType itself and then change the cast accordingly to chosen solution.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list