-->
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: Applying analytical function to childs in one to many
PostPosted: Fri Oct 11, 2013 11:23 pm 
Newbie

Joined: Tue Oct 08, 2013 10:37 am
Posts: 1
Team,

Im new to hibernate can some help me out in applying analytical function to only children set in one to many relationship

Code:
@Entity
@Table(name = "CIO_HUMANRESOURCES")
public class CIOHumanResources implements Serializable {
   private static final long serialVersionUID = 1L;

   @EmbeddedId
   private CIOHumanResourcesPK pk;

   @Column(name = "SCENARIO")
   private String scenario;

   @Column(name = "CREATOR_USER_ID", updatable = false, insertable = true)
   private String creatorUserID;

   @Column(name = "MODIFIER_USER_ID")
   private String modifierUserID;

   @Column(name = "CREATED_DATE", updatable = false, insertable = true)
   private Timestamp createdDate;

   @Column(name = "MODIFIED_DATE", updatable = true, insertable = true)
   private Timestamp modifiedDate;

   @OneToMany(mappedBy = "resources", fetch = FetchType.EAGER)
   @Fetch(FetchMode.SUBSELECT)
   @BatchSize(size = 200)
   private Set<CIOHumanResourcesApps> hrApps;
.....

}

Child

@Entity
@Table(name = "CIO_HUMANRESOURCES_APPS")
public class CIOHumanResourcesApps implements Serializable {

   private static final long serialVersionUID = 1L;

   @Id
   @Column(name = "APP_ID")
   private String id;
   @Column(name = "APP_TYPE")
   private String appType;
   @Column(name = "SVP_NAME")
   private String svp;
   @Column(name = "APP_VALUE")
   private String appValue;

   @ManyToOne
   @JoinColumns({ @JoinColumn(name = "MONTH", nullable = false),
         @JoinColumn(name = "QUARTER", nullable = false),
         @JoinColumn(name = "YEAR", nullable = false) })
   private CIOHumanResources resources;
....
}
}



Is there any way to apply analyatical function to child class, so that i can get childs in pirticular order.


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.