1
vote
1answer
12 views

Hibernate org.hibernate.MappingException for non-annotated field

This is my POJO, a simple student class. @Proxy(lazy = false) @Entity(name = "Students") public class Student implements Serializable { private static final long serialVersionUID = ...
0
votes
1answer
25 views

Hibernate many-to-many data retrival, via query

Please help me, I think there is something that I am not doing correct. I have User and Contact, that are in Many-to-Many relation. User.java: public class User { private Integer userID; ...
0
votes
1answer
20 views

Does the “mapping” tag in hibernate.cfg.xml have an equivalent property name in hibernate.properties?

I thought that hibernate.cfg.xml and hibernate.properties were effectively equivalent, and therefore, could be used interchangeably. Is this true? If it is true, then what is the equivalent property ...
0
votes
1answer
8 views

How to create a Hibernate POJO with a data member mapping to a column which is not unique

I have 2 tables : Employee and Department (many to one relationship) My pojos look like this: @Entity @Table(name = "employee") class Employee { @Id private String employeeId; @ManyToOne(cascade ...
0
votes
1answer
13 views

Hibernate cascading throws Exception on save

I'm trying to insert an object in the database. It contains a collection which also should be inserted, but I'm getting the exception below: SQLServerException: Cannot insert the value NULL into ...
0
votes
0answers
25 views

Hibernate cannot simultaneously fetch multiple bags two Lists

I have very strange situation. Before when I tried to fetch multiple collections by one try of HQL query I have not had this error. The Internet says that the problem can occur because of ...
1
vote
1answer
25 views

Unidirectional OneToMany with Foreign key doesn't insert to table

I have the following classes: @Entity @Table(name = "PARENT") public class Parent { @Id @GeneratedValue(strategy = GenerationType.AUTO) @Column(name = "PARENT_ID", unique = true, nullable = false, ...
0
votes
0answers
31 views

How to map collections with SqlResultSetMapping

I am in the process of creating a @SqlResultSetMapping for a (rather large) entity bean - the JPQL syntax wasn't able to do the necessary query (the set operators are lacking - the query needs to be a ...
-1
votes
1answer
19 views

Associations, jointable with three keys

I have question: Can I have joinTable with tree keys, like: User_UserDescription_UserReg_JOIN: User_ID ------------ UserDescription_ID -------------------- UserRegistration_ID ...
0
votes
0answers
11 views

Hibernate 3 tables assosiations between them

I'm doing my project and have some confusion. I have table INSTITUTION : ---> OneToMany bidirectional with CreationDate with JoinTAble |Institution| Institution_ID Institution_name ...
0
votes
0answers
14 views

getting error while deleting child

Actually I have three classed say A,B,C In A to B has many-to-one relation and cascading "all,delete-orphan" lazy="false" inverse="true" in B to C has many-to-one relation & properties ...
1
vote
0answers
28 views

Hibernate - mapping two parent table to one child table

I am facing a small problem in creating hibernate mapping files for below sort: Table A |-- Table B | | |-- Table C Table B has a column from Table A as foreign key Table C has a column from ...
4
votes
1answer
101 views

How do you retrieve nested Sets?

Is there an annotation I'm missing or is this a limitation to hibernate retrieval? Entities: class A { Long id; Set<B> b; @ManyToMany(fetch = FetchType.EAGER) @JoinTable(name = ...
0
votes
1answer
26 views

How to privent population of same data in DataBase with Hibernate

I'm doing my own project and have something to store in mysql database. After thinking what should be a best solution DO NOT repeat same value's in DataBase again I didn't find an answer. So let's ...
0
votes
1answer
16 views

OneToOne relation with nullable to true and relation using primary keys

I have two entities with a OneToOne relation: @Entity @Table(name = "APPLICATION_DEVICE") public class ApplicationDevice implements Serializable { [...] @Id public ApplicationDeviceKey ...

1 2 3 4 5 55
15 30 50 per page