-->
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.  [ 1 post ] 
Author Message
 Post subject: Access JDBC ResultSetMetaData
PostPosted: Wed Aug 25, 2004 4:21 am 
Newbie

Joined: Wed Aug 25, 2004 3:56 am
Posts: 2
[b]Hibernate version:[/b]
2.1
[b]Mapping documents:[/b]
N/A (general question)
[b]Code between sessionFactory.openSession() and session.close():[/b]
N/A (general question)
[b]Full stack trace of any exception that occurs:[/b]
N/A (general question)
[b]Name and version of the database you are using:[/b]
SQL Server 2000
[b]Debug level Hibernate log excerpt:[/b]
N/A (general question)

Is there any possibility to access metadata of JDBC ResultSet? I need to know the width of a column. If the corresponding column in HQL represents some property, I can read it from the mapping. But what if the column is computed? (We transform the selected objects to XML in order to initialize ClientDataSet Delphi component and it requires metadata information.) The best solution I know is maintain this information together with named queries, isn't there any better solution?

I know it violates the encapsulation of data to the objects a little bit but the metadata information is surely known during lifecycle of ResultSet and it's a pity that it is not propagated to Hibernate user.

Thanks a lot for any advice.

Tomas Zalusky


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.