-->
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: Postgresql and SQL quoted identifiers
PostPosted: Mon Aug 09, 2004 8:58 am 
Newbie

Joined: Mon Aug 09, 2004 8:12 am
Posts: 4
Hi,
I started using Middlegen yesterday and encountered two little problems.
(My dbase is Postgresql.)

First problem is with sequences.

Postgresql is case-sensitive about its objects, so i have to define my sequnce WAP_DOWNLOAD_LINK_ID_seq like:
<generator class="sequence">
<param name="sequence">"WAP_DOWNLOAD_LINK_ID_seq"</param>
</generator>

(notice " around sequence name)

but how to get it done with Middlegen? I can set correct sequnce (surrounded by ") in GUI, but thats painful in every generation.

Second problem is somewhat similar:
In order to not upset Postgres i have to map field names in case-sensitive manner like
<property name="linkUid" type="string" column="`LINK_UID`"/>
and it works.

But how can i surround field names with ` using Middlegen?

Hope someone can help,

Rigmor


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 09, 2004 9:24 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
Middlegen does not do this and there is not feature currently to allow it to be done easily. Your best option might be to edit the hibernate.vm sccript to add the characters in the appropriate places.


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.