-->
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.  [ 1 post ] 
Author Message
 Post subject: MySql and Guid Types
PostPosted: Wed May 25, 2005 8:22 pm 
Greetings,

I have a Customer object, and I have a System.Guid _id variable.

In MySql I have the type for the column specified at VARCHAR(38) to accomodate for the guid length.

I am new to MySql - so need some tips here.

My mapping file looks like

<id name="_id" column="ID" type="System.Guid">
<generator class="assigned" />
</id>

I can save my object fine - but loading it complains about "Object type cannot be converted to target type. "

later in the stack trace it shows

PropertyAccessException: The type System.String can not be assigned to a field of type System.Guid setter of Customer._id


Any ideas?


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

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:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.