-->
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: How to extract column names from Hibernate POJO?
PostPosted: Mon Jun 14, 2004 10:33 pm 
Newbie

Joined: Mon Jun 14, 2004 10:26 pm
Posts: 1
I am using Hibernate 2.1.3 and I want to write a component or hopefully find one if any that can create Swing table model based on query result. Using IBatis I can change the result-class = 'java.util.HashMap' and I will get the column names along with their values (sorry I used IBatis just for comparison) . If I use Jdbc way I can use resultset's metadata. And for my current project I want to implement Hibernate and I am stuck on this problem .

I do hope Hibernate provides a method or util class to extract values and column names in form of Map instances such as HashMap.

Thanks

Indra


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 14, 2004 10:37 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
Write a utility method that uses ClassMetadata.getPropertyNames(), ClassMetadata.getPropertyValues()


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.