[ http://jira.codehaus.org/browse/JIBX-77?page=all ]
Dennis Sosnoski resolved JIBX-77:
---------------------------------
Resolution: Fixed
Fix Version: JiBX 1.1 beta4
Implemented create-type attribute to handle this situation.
> 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: Wish
> Components: core
> Versions: 1.0-RC0
> Reporter: Jagannathan
> Assignee: Dennis Sosnoski
> Fix For: JiBX 1.1 beta4
>
>
> 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
-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
_______________________________________________
jibx-devs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-devs