-->
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.  [ 6 posts ] 
Author Message
 Post subject: Hibernate Collections and result sets
PostPosted: Tue Jan 04, 2005 3:17 pm 
Newbie

Joined: Tue Jan 04, 2005 2:37 pm
Posts: 5
We are attempting to integrate with a presentation layer technology that works exceptionally well with result sets and, to a lesser degree, XML documents.

Is there a way given a hibernate collection to return the collection as a JDBC result set?

An alternative solution would be to serialize the collection and its contents; however, that is percieved to be less desirable.

Has anyone in the hibernate community experience with these two approaches? What reccomendations/caveats/guidelines would you give?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 04, 2005 3:33 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
If you work with tabular data throughout your application, why use an object/relational mapping tool at all? Use plain Java/JDBC/SQL or one of the trivial JDBC frameworks.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 04, 2005 3:44 pm 
Newbie

Joined: Tue Jan 04, 2005 2:37 pm
Posts: 5
Good angle, but unfortunately does not address the questions.

The short answer - we have an application framework build on hibernate that we must integrate with the presentation technology (another app). The application framework includes a query builder on top of HQL as well as a good deal of development that supports business rules, etc - the app framwork is used by a number of other apps.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 04, 2005 4:09 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
No, you'll have to write this yourself. Your case is really special.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 04, 2005 6:24 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
i dont know what great presentation layer you are refeerring to, but systems like jasper reports (and other reporting) has an abstraction that is easily implemented on top of a standard java object/collection....if the only "interface" is a resultset, then write a resultset implementation that delegates to a collection/object[].

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 04, 2005 9:15 pm 
Newbie

Joined: Tue Jan 04, 2005 2:37 pm
Posts: 5
Thank you for your responses - and I think that you have addressed the JDBC aspect.

To restate - there is no capability within hibernate to return a result set representing a collection of objects. Which I sort of figured after poking around in the javadoc, forums, etc, but I wanted to be certain.

I do agree that the result case is *special* - and certainly not within mainstream hibernate. The delegation approach may work - but I have to mull that option over.

No one addressed the XML approach however. There are a number of candidate technologies that provide various approaches / options for java object serialization including java XMLEncoding ..... Any suggestions / experiences?

The presentation technology in question is cold fusion MX and Flex. Although I do not believe that I used the adjective 'great' in desrcibing it, it is a powerful analog to other presentation markup. There have been several posts regarding cf - none of them have been answered/addressed.


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