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: Help: Incorrect syntax near '-'.
PostPosted: Sat Jul 29, 2006 1:53 am 
Newbie

Joined: Sat Jul 29, 2006 1:41 am
Posts: 1
Hi,

I am using Guid for the ID type, and when I invoke the object Load(Type theType, object id)method, it throws the exception: System.Data.SqlClient.SqlException: Incorrect syntax near '-'.

The id tag defined in the hbm file is like this:

<id name="ID" column="ContactProfileID" type="Guid">
<generator class="assigned"/>
</id>

did anyone meet the issue before?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 31, 2006 6:16 pm 
Senior
Senior

Joined: Wed Jun 15, 2005 4:17 am
Posts: 156
Please read the guidelines on how to do a proper request for help. Your post is incomplete so its practically impossible to understand what is going on. So don't expect too many replies!

As a wild guess I think the datatype you use to pass the guid is not appropriate and the generated SQL doesn't enclose the guid in quotes. But there are many things involved: the mappings, the code, the dialect etc.

cheers,
Radu


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