-->
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: one-to-one to a collection handler instead of one-to-many
PostPosted: Fri Feb 04, 2005 11:10 pm 
Beginner
Beginner

Joined: Wed Feb 04, 2004 4:54 am
Posts: 25
Hi all,

Use case:

Code:
interface Parent {
   CollectionManager getChildManager();
}

interface CollectionManager {
   Set getAll();
   Set find(String hqlWhereCondition);
}

interface Children {
  Parent getParent()
}



and here is the table:

Code:
parent (
  id
  name
)

child (
  id
  idparent
  name
)


In fact only Parent and Children are persistent classes and ChildManager is simply a collection manager that allow me to sort and filter or to apply Transformers or any other utility to the objects before to use them.

I need the ChildManager because children can be very much and I cannot implement every search method: so I would like to use "HQL" where as a parameter for ChildManager.Find()

Is there a clean way to do that? Any hint?

_________________
Stefano Bagnara


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.