1. Updation issue in child table using hibernate stackoverflow.comI have two tables, A & B having one-to-many relation. For this I am using List collection inside the parent pojo. The code of hbm file of A is - ... |
2. Unable to hydrate children forum.hibernate.orgI am using the Jpa interface. I have two classes: Parent, Child. Parent contains a "Set |
3. HSQ question: how to only one child forum.hibernate.org |
4. Retain reference to set of children forum.hibernate.orgI have a parent child relationship in which the parent has a collection of children (a set to be specific). The child collection is setup with cascade="all-delete-orphan". When I initially save the parent element everything works as expected. However, when I update the parent and save again, all the children are re-saved. For instance: A new parent is created with a ... |
5. Mapping children to grandparent forum.hibernate.org |
6. Having problems with Master child configuration forum.hibernate.orgHi, Thanks in advance for looking at this posting. I am trying to configure master child relationship in my classes and having issues with it. Following are my classes. Parent class is Offering. Code: public class Offering extends DomainObject{ private int id; @OneToMany(cascade={CascadeType.PERSIST,CascadeType.MERGE},targetEntity=OfferingMessage.class,fetch=FetchType.EAGER,orphanRemoval=true) @JoinColumn(name="offeringId") @Fetch(FetchMode.SUBSELECT) private List |
7. Paginate child forum.hibernate.org |
8. one-to-many returns only one child record. what am i missing forum.hibernate.orgThe following are my classes and mapping. Both these are VIEWS. AUCTIONS view has information about the location & PRTDIRVIEW has the info about the people working in the location. When i individually extract the info for PRTDIRVIEW i used composite-id like i showed below and worked fine. I used composite-id since view does not have any single field unique. I ... |
9. Which child class should be cast ? forum.hibernate.orgpublic List findAnimal(List id) { String[] param = {"ani_ids"}; return getHibernateTemplate().findByNamedQueryAndNamedParam( "from Animal ani where ani.id in (:ani_ids)",param, new Object[] { id}); } |
10. how to get child columnvalue wen you execute parenttable qry forum.hibernate.org |
11. one-to-many - overwrite children not append! forum.hibernate.orgHibernate version: 3.0.5 I start off from a java object of parent (not 'connected' to database). I set a Collection of children. I call the update function. What I notice is that, the older children of the parent still exist. And new children are added. If I start off with 2 children of a parent p, and then go onto set ... |
12. how to add child X in (A is a B and B has X as child) forum.hibernate.orghi, Can someone kindly point me in the right direction. I am trying to add the address when creating the Buyer (TbBuyer) record. Buyer is inherited from User class (tbUser). But am not able to create the address record (TbAddress). Hibernate did not create the sql code to create it. TB_BUYER and TB_USER records were created okay. But not, TB_ADDRESS record. ... |
13. AliasToBeanResultTransformer doesn't create a child? forum.hibernate.orgSo... if i understand you what you want is to retrieve studendt.id student.name course.description only? Then you need a StudentDTO.java like this: class StudentDTO{ private Integer id; private String courseDescription; private String name; } and use the following projections: Criteria c = SessionManager.getSession().createCriteria(Student.class); c.createAlias("course", "course", CriteriaSpecification.LEFT_JOIN); ProjectionList pl = Projections.projectionList(); pl.add(Projections.property("id"), "id"); pl.add(Projections.property("name"), "name"); pl.add(Projections.property("course.description"), "course.description"); c.setProjection(pl); c.setResultTransformer(new AliasToBeanResultTransformer(StudentDTO.class)); |
14. Prent child problem forum.hibernate.orgHi all, I have created two tables with a parent child relationship between them. The problem comes when i try to store parent and child objects together. I am getting exception the foreign key in child table cannot be null. I want to ask how can i store parent and child objects together in a single session? Also i have included ... |
15. Easy retrieval of child records forum.hibernate.orgI am a Hibernate beginner and have a really simple case, that I can not seem to find the solution to. I have searched tutorials and references, but I must have missed something. I have a table "header_table" that is a parent table. I also have a "line_table" that are child records of the "header_table" (one-to-many) - one header-record can have ... |
16. Child table of Secondary Table forum.hibernate.org |
17. *** many-to-many link table with childs *** forum.hibernate.org |
18. relacion father / children forum.hibernate.org |