Questions related to hbm.xml files used by the Hibernate ORM to define mappings, as opposed to the more modern mapping strategy using annotations.
Questions tagged [hbmxml]
72 questions
2
votes
4 answers
Making NHibernate "translate" C# POCO Guid property with value of System.Guid.Empty to be saved as NULL for the Database uniqueidentifier field?
Our office team is working and ASP.NET project that uses .NET Framework 4 and NHibernate 3.3.1
I have a POCO domain class called AllResourcesInfo ( which ultimately maps to a Resource table in the database that is inner joined to some other tables,…

crazyTech
- 1,379
- 3
- 32
- 67
2
votes
1 answer
Hibernate Query with entity-name
I am using a POJO to define two tables (Main and backup). Both XML Classes are refering to same Java Class.
Reference : Mapping same POJO to more than one table in Hibernate XML mapping files

Shirish Bathe
- 627
- 9
- 22
2
votes
1 answer
How to add extra columns in many to many join table in hbm.xml : hibernate?
Possible Duplicate:
Can add extra field(s) to @ManyToMany Hibernate extra table?
Here is my problem,is there any way to add extra columns in many to many join table using hbm.xml files in hibernate. Just like:
Create table employee(
emp_id int…

Ravin'
- 21
- 2
1
vote
1 answer
NetBeans > Hibernate Wizards > Create POJOs from database" (Derby) does not generate any relationship-mappings in hbm.xml
I'm generating POJO from Derby 10.14.2.0 database in NetBeans IDE 11.3, Hibernate ORM 5.4.31.
It does not generate any relationship-mappings in hbm.xml or in entity classes like many-to-one/one-to-one).
I used Derby sample project for mcve.
I've…

Swapnil
- 115
- 1
- 12
1
vote
0 answers
Is there any way in hibernate to disable caching for particular Property for Entity class in .hbm file?
Is there any way in hibernate to disable 2nd level caching for particular Property (by provide some ignore caching property) in .hbm file?
For Example,I have TextObject.hbm.xml file as following

Nishith Patel
- 43
- 1
- 4
1
vote
1 answer
How to find records with Foreign Key using Criteria Query. It's hibernate One-to-One Bidirectional mapping with Foreign Key done using hbm.xml
I have two entities namely Student and Address. The parent Entity being Student and the Child entity being Address. Considering that each student can have only one Address and each Address can belong to only one student, this makes it a One-to-One…

RRV
- 51
- 8
1
vote
2 answers
Where can I find documentation for Hibernate's legacy hbm.xml mapping files?
I have joined a new team, and their project is using pretty much exclusively legacy-style Hibernate Mapping files (*.hbm.xml) for their Hibernate set-up. The current documentation pretty much seems to restrict itself to mention that Hibernate still…

Christian
- 6,070
- 11
- 53
- 103
1
vote
1 answer
Unable to instantiate default tuplizer: HIbernate
I have written sample hibernate appli with composite key as below :
when i try to run the application to create table am getting below error. I am new to hibernate . Could anyone let me know what am i missing here.
Product.hbm.xml:

user3298545
- 13
- 1
- 4
1
vote
1 answer
Override primary key in hibernate subclass
I have an AbstractAccount hbm file where i set accountNumber as primarykey. I'am extending this class in my Account.hbm.xml file where I want to over ride this primary key as countryCode and accountNumber composite key. How can i do…

Vipin CP
- 3,642
- 3
- 33
- 55
1
vote
2 answers
How to fix mapping not found exception for Hibernate 5?
Hello I am new in hibernate and at the moment I'm trying to do something in practice. But have some errors.
I try to use hibernate in my project. I read the tutorial and start to integrate Hibernate into my java maven project.
So first of all I…

Nickolas
- 192
- 7
- 20
1
vote
1 answer
1
vote
0 answers
How to do many-to-one mapping in a Hibernate hbm file
I need to use many to one relationship between two tables while using the spring hibernate integrated program. I have employee.hbm.xml and admin.hbm.xml which has corresponding bean classes.
empid in employee.hbm.xml acts as a foreign key in…

vasanth
- 224
- 3
- 19
1
vote
1 answer
How to map a multiple column unique contraint in hibernate with an abstract class field and a subclass field
In short: Is there a way to write a hibernate xml mapping with a two column unique constraint, where one field of the unique constraint is part of the mapping of an abstract class and another field is defined in the subclass mapping?
Long version: I…

rostbot
- 342
- 3
- 12
1
vote
2 answers
The content of element type "id" must match - hbm xml
I know this question is asked quite often.
I get the below mapping error.
I have tried some permutations and combinations.
I've tried some solutions and cannot seem to get this fixed.
Can someone look at my below configuration?
The xmls are…

BVAD
- 75
- 2
- 6
1
vote
0 answers
Hibernate 3.0: How to define a set of String mapped to a composite id in hbm.xml file
I am writing an order.hbm.xml file for my POJO class as below using Hibernate 3.0
import java.util.Set;
public class OrderDAO
{
private EmbeddedCustDAO embedCustID;
private Set custOrderSet;
private String totalAmount;
…

Harish
- 181
- 1
- 3
- 11