-->
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.  [ 7 posts ] 
Author Message
 Post subject: can SchemaExportTask generate quoted identifiers at output?
PostPosted: Sun Mar 27, 2005 9:09 am 
Newbie

Joined: Fri Mar 04, 2005 3:00 pm
Posts: 14
Hello,

I use schemaExport to generate my sql file and it works fine. A part of my output looks like this
Code:
create table WebOfferRequestParamsTable (
   ID int not null,
   webProbeID int not null,
....


problem is, when I excute this file with the ant task sql, everything is coverted into uppercases in the dataBase. In order to have the case preserved in th dataBase I need to have names quoted in the sql file, like the following
Code:
create table "WebOfferRequestParamsTable" (
   "ID" int not null,
   "webProbeID" int not null,
....


is there a way to make schemaExport generate my sql file with quotations included ?

thanks


Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 27, 2005 9:55 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
yes use qoutes in the hbm.xml (backticks will be converted to dialect specific quotes - see doc for examples)

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 27, 2005 12:11 pm 
Newbie

Joined: Fri Mar 04, 2005 3:00 pm
Posts: 14
the problem is the fact that i generate my mappings with xdoclet and
for many properties I am happy with the name of the attribute and write just
@hibernate.property

is there a solution to this? maybe a flag to set to hibernatedoclet or schemaExportTask ?...just asking


Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 27, 2005 12:17 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
then dont quote names that are fine- only quote those that you want "forced" into the database.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 27, 2005 12:26 pm 
Newbie

Joined: Fri Mar 04, 2005 3:00 pm
Posts: 14
I think I didn't made myself clear. for example i have the following code :
Code:
/**
     * @hibernate.property
     * @return
     */
    public Integer getRequestType()
    {
        return requestType;
    }


this come into the mapping file like
Code:
<property
......
            column="requestType"
        />


instead of
Code:
column= "`requestType`"

which is what i need in order to preserve case;


Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 27, 2005 12:36 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
then use the xdoclet for specifying the column name.
yes - its redundant but that is what you would need to do it.

btw. why do you want the case preserved for all costs in the db ?
most dbs are case insensitive so it doesnt matter. Is it just for style ?

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 27, 2005 1:19 pm 
Newbie

Joined: Fri Mar 04, 2005 3:00 pm
Posts: 14
well, you could say that is just for style :)
i like to see things clear
thanks for the answers


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