-->
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.  [ 3 posts ] 
Author Message
 Post subject: Subclass of java.util.Collection in collections
PostPosted: Fri Feb 04, 2005 12:06 pm 
Newbie

Joined: Mon Sep 20, 2004 6:58 am
Posts: 6
How can I use a subclass of java.util.Collection in Hibernate associations ?
For example, in a Customer class having an assocation with class Product via methods :

[code]public ProductCollection getProducts()

public void setProducts(ProductCollection products)
[/code]

I have to write an accessor class to convert a Collection coming from Hibernate into a ProductCollection and back. It works this way, but a lot of Hibernate's power with dirty checking and lazy retrieval is lost. Is there a chance Hibernate will support subclasses of java.util.* ? Or are there easier ways ?

Sytze van Koningsveld.

[b]Hibernate version:[/b]
2.1.6
[b]Mapping documents:[/b]
(probably not relevant)
[b]Code between sessionFactory.openSession() and session.close():[/b]
N/A
[b]Full stack trace of any exception that occurs:[/b]
N/A
[b]Name and version of the database you are using:[/b]
N/A
[b]The generated SQL (show_sql=true):[/b]
N/A
[b]Debug level Hibernate log excerpt:[/b]
N/A


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 04, 2005 7:01 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
In Hibernate3, use org.hibernate.usertype.UserCollectionType


Top
 Profile  
 
 Post subject:
PostPosted: Sat Feb 05, 2005 7:38 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Damn, I didn't knew that one, we rock :-)

_________________
Emmanuel


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