Hibernate uses mapping metadata to find out how to load and store objects of the persistent class. The Hibernate mapping could be specified using configuration files or annotations.

learn more… | top users | synonyms

0
votes
0answers
3 views

hibernate criteria query with multiple mapping

I have to modify a hibernate criteria query. The mapping is:- ClassA n:m ClassB 1:1 ClassC. Here I have to find a list of ClassA instances in the DB which have the exact set of ClassC instances ...
0
votes
0answers
9 views

Cannot fetch data from database using spring and hibernate

i am developing a spring and hibernate application and got into a problem. i have a many to many related entity's with join table which are: @Entity public class Invoice implements ...
1
vote
0answers
32 views

I do not understand this mapping file.What does many-to-many tag here do?

I have a problem understanding the following hibernate mapping xml. <class name="pojo.NewClass" table="emp_master"> <id name="emp_code"> <generator class="increment" ...
1
vote
1answer
59 views

what type of mapping is this?

With the hibernate mapping file as shown : <hibernate-mapping> <class name="pojo.Ghazal" table="ghazal"> <id name="s_no"> <generator class="increment" ...
2
votes
1answer
32 views

Hibernate and MS SQL Server Identity column

I'm new to Hibernate and am unable to use an Identity column. When I run my java program using identity as generator, it gives the error that it "...cannot insert default or null value" in the ...
0
votes
1answer
18 views

How to set fetch=“Join” and lazy=“False” in <key-many-to-one > mapping in hbm.xml

I have table mapping in .hbm.xml file as follows. when i set lazy loading to false , it is not working. It is fire lots of select query to db to load other table. <class name="GroupConfigDO" ...
0
votes
1answer
17 views

How to insert using hibernate 4.1.10.Final?

I am using hibernate 4.1.10.Final to insert data into database, but it throws the following exception, I have three tables, development and address . Development has an object of address in itself. ...
0
votes
2answers
53 views

how to implement auto increment id field per table with Hibernate and postgresql for one to many relationships

I have 4 entities one-to-many Message entity: @Entity @Table(name = "Messages") public class Message { ... @ManyToOne(cascade = CascadeType.ALL) @JoinColumn(name = "messagesounds_id") ...
1
vote
0answers
36 views

On JBoss AS 7.1.1, why does Hibernate's AnnotationBinder not detect annotated entities?

I'm trying to migrate a Spring application from JBoss AS 4.0.5.GA to 7.1.1.Final. In my jboss-spring.xml there is one bean, engine, whose init method results in the createQuery row below being ...
1
vote
1answer
28 views

How to load only ids from Many to Many mapping tables?

In a Many to Many relation between two table with a Mapping table in between, how can I only load ids for the second entity. Following is the example to explain what I want to achieve here. Below is ...
0
votes
1answer
16 views

My hibernate mapping file doesn't pass the validation test and I get an exception as I try to run the program.Why is that?

As I try to run a program with the following xml mapping file, I get an exception which says : org.xml.sax.SAXParseException: The content of element type "joined-subclass" must match ...
0
votes
1answer
25 views

what is wrong with the hibernate mapping xml?

As I validate the following xml, I get the following error : The content of element type "class" must match "(meta*,subselect?,cache?, synchronize*,comment?,tuplizer*,(id|composite-id), ...
-1
votes
0answers
37 views

Hibernate Error :Could not parse mapping document from resource "<filename>.hbm.xml

Here is my somename.cfg.xml file <hibernate-configuration> <session-factory> <!-- Database connection settings --> <property name="connection.driver_class"> ...
0
votes
1answer
23 views

Bidirectional mapping by one of two possible columns

How would you define a bidirectional mapping between the following entities: @Entity class Host { @Id String id; HaGroup haGroup; // needs mapping } @Entity class HaGroup { @Id ...
0
votes
1answer
15 views

org.hibernate.InvalidMappingException: Could not parse mapping document from resource hibernate.hbm.xml. Why am I getting it?

While trying to write a text file to the database, I get the following exception : org.hibernate.InvalidMappingException: Could not parse mapping document from resource hibernate.hbm.xml as soon ...

1 2 3 4 5 59
15 30 50 per page