-->
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.  [ 5 posts ] 
Author Message
 Post subject: sql-query using <
PostPosted: Wed Sep 21, 2005 1:34 am 
Beginner
Beginner

Joined: Thu May 12, 2005 2:14 am
Posts: 33
Location: Sweden, Sk
Hi

Im trying to understand the sql-query mappings. In my query I need to use the sign <= and <. But when I validate the xml document i get, This is an unexpected token. The expected token is 'NAME'. Line 17, position 88

How can I escape it or isnt it possible to use less than?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 21, 2005 5:47 am 
Newbie

Joined: Thu May 12, 2005 10:40 am
Posts: 16
i had the problem within xml-comments
&#x3c;
is an xml-replacement for the < sign, maybe this helps in nhibernate too..


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 21, 2005 1:57 pm 
Beginner
Beginner

Joined: Thu May 12, 2005 2:14 am
Posts: 33
Location: Sweden, Sk
Hi again

It works if I use &lt; so the problem is solved

It doesnt feel perfect but it works.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 21, 2005 4:32 pm 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
You can also use standard XML CDATA facility to escape queries. Something like <![CDATA[Your code goes here and may include <, > and & and anything else]]> - I don't remember the exact syntax, but this should be close.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 21, 2005 4:53 pm 
Beginner
Beginner

Joined: Thu May 12, 2005 2:14 am
Posts: 33
Location: Sweden, Sk
thx that looks better


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 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.