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.  [ 4 posts ] 
Author Message
 Post subject: Problem with Database Function translate in a new Dialect
PostPosted: Sun Jun 15, 2008 3:14 pm 
Newbie

Joined: Sun Jun 15, 2008 2:29 pm
Posts: 2
Location: Germany
Hello,

I write a new Dialect for die Database Gupta SQLBase. I registry the Database-Functions, with RegisterFunction.

Example:
RegisterFunction("upper", new StandardSQLFunction("@UPPER"));

This Function is working. I see this translation in the "sqlFunctions" object, at the runtime.

Example:
session.Dialect.Funtion["upper"] is "@UPPER".

NHibernate don't translate the HQL-Statement.

Example
SELECT upper(columnXYZ) FROM tableXYZ
the result
SELECT upper(columnXYZ) FROM tableXYZ
it not work. I want the result
SELECT @UPPER(columnXYZ) FROM tableXYZ

I don't find the location how translate the Function in the source code. I have write "RegisterFunction("upper", new StandardSQLFunction("@UPPER")); " in a other Dialect with the self result.

Why don't working the translation?? It this a bug or must I do something before I use the Function "RegisterFunction"??

P.S. sorry, because of my bad English.

With friendly regards
Matthias


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 16, 2008 2:27 am 
Regular
Regular

Joined: Thu Mar 06, 2008 5:06 am
Posts: 68
I also noticed, that this substitution of function names doesn't work with nhibernate 1.2.1.
You need to register the functions to use them in hql statements (otherwise an exception is thrown). But the function names are not translated.


Top
 Profile  
 
 Post subject: To Use Render Function
PostPosted: Tue Jun 24, 2008 2:29 am 
Newbie

Joined: Sun Jun 15, 2008 2:29 pm
Posts: 2
Location: Germany
Hello,

all Dialect Functions (NoArgSQLFunction,...) have the Function "Render". The Function Render translate die SQL-Function. But this Function is never use.

Is this a bug, and working correct in the next version???

Must I do something, to use this Function????

With friendly regards
Matthias


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 24, 2008 7:20 am 
Regular
Regular

Joined: Thu Mar 06, 2008 5:06 am
Posts: 68
I'm pretty sure it's a bug... or the code is intended to be used in later versions, but prepared in nhibernate 1.2.


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