-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Dynamic model and string with comma
PostPosted: Wed Sep 28, 2011 2:12 pm 
Regular
Regular

Joined: Wed Sep 22, 2004 8:27 am
Posts: 89
Hi,
i've tried to map a table by dyamic mapping as

Code:
<hibernate-mapping>

    <class entity-name="Customer">

        <id name="id"
            type="long"
            column="ID">
            <generator class="sequence"/>
        </id>

        <property name="name"
            column="NAME"
            type="string"/>

        <property name="address"
            column="ADDRESS"
            type="string"/>
       
    </class>
   
</hibernate-mapping>




Than i've tried to insert or update a record as:

Code:

// Create a customer
Map david = new HashMap();
david.put("name", "David");
david.put("address", "via pippo,pluto");
s.save("Customer", david);



Into the address property i've put a comma "," but when session has commited an exception has been raise:

this exception was something like bind exception where ClassCastExpetion beetween java.list.Array and java.lang.String.
But if i set address without any comma everything work correct.

Any idea or solution?


Top
 Profile  
 
 Post subject: Re: Dynamic model and string with comma
PostPosted: Tue Oct 04, 2011 6:53 am 
Regular
Regular

Joined: Wed Sep 22, 2004 8:27 am
Posts: 89
Anyone could help me?

Thanks


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.