Collection type attribute should be used only for unmarshalling and not for
marshalling
---------------------------------------------------------------------------------------
Key: JIBX-77
URL: http://jira.codehaus.org/browse/JIBX-77
Project: JiBX
Type: Bug
Components: core
Versions: 1.0-RC0
Reporter: Jagannathan
Priority: Critical
Hi,
I am using Jibx with Hibernate.
Now i have a Model which has a property of type java.util.Set. Now there are
two scenario's in which this set would be initalised. one where Hibernate loads
it in which case the instance would be org.hibernate.PersistentSet and in
another case i would load the set in which case the instance would be
java.util.HashSet.
Now the problem is when i define the Mapping i give the
<structure name="su">
<collection field="csu" type="java.util.HashSet"/>
</structure>
Now when i marshall the data from hibernate i get a classcastexception.
I expect this Hashset to be used only in the case of unmarshalling where a new
instance for that property has to be created.
Since other wise all marshalling operation can happen against the Interface
itself.
But it is not happening so. The type is being used for both
unmarshalling/marshalling . what i would prefer is a scenario where the
declared type of the property is used for marshalling and the type specified
for the collection tag used for creating the new instance's only.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
jibx-devs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-devs