-->
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: sorting/restrictions on dependencies
PostPosted: Thu Dec 09, 2010 8:06 am 
Beginner
Beginner

Joined: Sun Aug 13, 2006 8:40 am
Posts: 28
I have an entity (A) which has a one to many dependency to another entity (B).

My problem is that in the database there is about one and a half million rows of B per one row of A. I am only interested in the newest row of B which do not have an historic date set.

I cannot find any examples of this using @-annotations (JDK 5.0+), but only XML.

Is this not possible without using XML?

I can deal with the historic date issue, but how can I determine restrictions/sorting on a field called REGISTERED_DATE?

Code:
    @OneToMany(mappedBy="...")
    @Where(clause = HISTORIC_DATE + " is null")
    private List<B> bs = new ArrayList<B>();


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.