-->
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: column spaces and hibernate
PostPosted: Thu Apr 21, 2005 12:40 pm 
Beginner
Beginner

Joined: Tue Apr 19, 2005 9:39 am
Posts: 45
How does hibernate take into account column names with spaces?

Example:

Table: Person
Column name : First Name


in DB2:
create table person ("First Name" varchar(30))


Hibernate xml file:
...
column= "First Name"


Will it take what is inside there and put it inot an sql command with just that string there (i.e. First Name)

this will not work on the db2 side....Any Help??

I can explain why I am trying to do this if asked.

Brandon


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 21, 2005 2:07 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
look for quoting in the hibernate docs

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 21, 2005 2:13 pm 
Beginner
Beginner

Joined: Tue Apr 19, 2005 9:39 am
Posts: 45
max wrote:
look for quoting in the hibernate docs


Sorry for a dumb question but I am not finding where in the docs the answer to my question is.

B


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 21, 2005 2:28 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
did you even try searching for quote in the docs ? ;)

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 21, 2005 3:07 pm 
Beginner
Beginner

Joined: Tue Apr 19, 2005 9:39 am
Posts: 45
1. UserQuotes
Recently I've begun to see some comments on Hibernate...

2. UserType for empty String escaping
This 'pattern' is of use when you ...


3. Community Supported Databases
This page is community driven. The official ...


Yep! :) still didn't find anything protaining to my problem...what was it again...ohh :) having spaces in column names of a table and how Hibernate interprets it.

I am trying to make a series of check boxes dynamic to changes to the database (DDL changes). Lets say I have 3 columns x y z, I want to dynamically create a list of check boxes labeled x y z. Now if I were to add a fourth column p then a check box p will be added without me having to touch the application side.


If x y z aren't in a user friendly format like lastName then it looks bad ...soo, I know db2 can take spaces in column names like "Last Name" but I don't know how Hibernate interprets that in the mapping file and when it uses it in a query.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 21, 2005 3:12 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
why dont search the doc http://www.hibernate.org/hib_docs/v3/re ... ml_single/ instead of the wiki as i said from the beginning ? :)

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 21, 2005 3:16 pm 
Beginner
Beginner

Joined: Tue Apr 19, 2005 9:39 am
Posts: 45
Okay I am retarded...you can tell I am newbie!!! other than the single lonely stripe to the left ;-). thanks for your help.


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.