in context:
http://old.nabble.com/Mapping-of-a-Set-with-enums-tp23602196p27211940.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.
-
To unsubscribe, e-mail: user-java-unsubscr...@ibatis.apache.org
For addit
neralStatement.java:173)
>> > ... 46 more
>> > Caused by: java.lang.InstantiationException:
>> > hedge.interfaces.CreditEventEnum
>> > at java.lang.Class.newInstance0(Class.java:340)
>> > at java.lang.Class.newInstance(Class.java:308)
>> > at
>> com.ibatis.common.resources.Resources.instantiate(Resources.java:294)
>> > at
>> >
>> com.ibatis.sqlmap.engine.mapping.result.ResultObjectFactoryUtil.createObjectInternally(ResultObjectFactoryUtil.java:127)
>> > at
>> >
>> com.ibatis.sqlmap.engine.mapping.result.ResultObjectFactoryUtil.createObjectThroughFactory(ResultObjectFactoryUtil.java:95)
>> > at
>> >
>> com.ibatis.sqlmap.engine.exchange.JavaBeanDataExchange.setData(JavaBeanDataExchange.java:106)
>> > ... 56 more
>> >
>> > Cheers,
>> > Micke
>>
>> I think you will need to create a typehandler so iBATIS can work with
>> your
>> Enum.
>>
>> See:
>> http://opensource.atlassian.com/confluence/oss/display/IBATIS/How+do+I+use+a+Custom+Type+Handler+with+complex+property+or+Type+Safe+Enumeration
>>
>> Regards,
>> Wessel
>>
>
>
--
View this message in context:
http://www.nabble.com/Mapping-of-a-Set-with-enums-tp23602196p23611347.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.
Hi Mikael,
could you try to map creditEvents to a Set of Strings instead and see if this
works?
Regards
Ka
--- Original Nachricht ---
Absender: Mikael Andersson
Datum: 18.05.2009 23:52
> Hi
>
> I have a typehandler for the enum in the second result map which is
> referenced from the Counterpa
Hi
I have a typehandler for the enum in the second result map which is
referenced from the CounterpartyHedgeVOResult result map.
Do you mean that I should try having the second result map just return
strings, and change the line in the first result map to this? :
I'll give it a go tomorrow whe
On Mon, May 18, 2009 at 7:40 PM, Mikael Andersson wrote:
> Hi
>
> I'm having problems mapping to a property which is a Set of java5 enums.
>
> I have a class CounterpartyHedgeVO which has the property creditEvents which
> is a Set.
>
> Not sure what the problem is but I'm guessing that iBATIS trie
Hi
I'm having problems mapping to a property which is a Set of java5 enums.
I have a class CounterpartyHedgeVO which has the property creditEvents which
is a Set.
Not sure what the problem is but I'm guessing that iBATIS tries to treat the
Enum like a POJO and fails to create it since there isn'