-->
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: Interfacing with Unidata - advice wanted
PostPosted: Sun Nov 20, 2005 7:05 pm 
Newbie

Joined: Mon Oct 06, 2003 1:01 am
Posts: 2
Hi,

I need to access some legacy data in a UniData 7.1 database. So far I've got the JDBC driver going and now I'd like to get some ORM happening.

I've begun by writing a trivial Dialect class but this fails on the simplest query because the UniData SQL does not support column aliases.

An example of the SQL generated by Hibernate for a simple query is:

Code:
select this_.CODE as CODE0_0_, this_.DESCR as DESCR0_0_ from GF_COUNTRY_NF_SUB this_;
[i]syntax error[/i]


However if I remove the "as ..." clauses and submit the SQL directly, then it executes without error:

Code:
select this_.CODE, this_.DESCR from GF_COUNTRY_NF_SUB this_;



So, is this a lost cause? Is there any way to "dumb down" the SQL that hibernate generates so as to accomodate the limited syntax supported by UniData?


Andrew.


Top
 Profile  
 
 Post subject: sql
PostPosted: Mon Nov 21, 2005 1:24 pm 
Expert
Expert

Joined: Fri Jul 22, 2005 2:42 pm
Posts: 670
Location: Seattle, WA
You may try support for named SQL queries if all you need is to retrieve the data
http://www.hibernate.org/hib_docs/v3/re ... medqueries

For full CRUD operations you may need to look at iBatis
http://ibatis.apache.org/

_________________
--------------
Konstantin

SourceLabs - dependable OpenSource systems


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.