Questions tagged [hbmxml]

Questions related to hbm.xml files used by the Hibernate ORM to define mappings, as opposed to the more modern mapping strategy using annotations.

72 questions
0
votes
1 answer

Hibernate - values vs. values

I'm back here in Stackoverflow wondering what the difference is between values in and within a Hibernate's hbm.xml file. I explain myself a little better:
kazbeel
  • 1,378
  • 19
  • 40
0
votes
0 answers

Is there a way to convert Hibernate XML mappings to Annotational Mappings?

Is there a possibility to convert my existing hbm.xml mapping to annotational mapping? The goal is to get through an automatic mechanism all my xml mappings to annotational Mappings.
Artur Rem
  • 209
  • 1
  • 4
  • 18
0
votes
1 answer

Hibernate mapping with several tables and Native SQL

I have some doubts about how to make a hbm.xml file for a mapping in Hibernate. The problem comes when mapping a Java object which has fields in several tables. The custom framework we are using requires to have a hbm.xml file for each object, but…
madtyn
  • 1,469
  • 27
  • 55
0
votes
2 answers

composite key if composite class contains class type references in a field

I have one Driver class: public class Driver { private String driverId; private String driverName; //getter and setter } and one DriverEntry class which is used to store the driver daily driving details and DriverEntry class has…
infinitoz
  • 13
  • 9
0
votes
1 answer

hibernate Association Table with extra column

I'm currently working with hibernate and oracle SQL Developer and I have a problem. Indeed, I have 2 tables Employee and Building with a many-to-many association between them. So I have also created an association table in SQL Developer called…
Niklas
  • 41
  • 3
0
votes
1 answer

Hibernate One To One mapping, with one child and two parent tables

I have two parent tables and one child table, with composite key's mentioned below: Employee: employeeId1 (PK) employeeId2 (PK) employeeName ---some other columns go here---- Student: studentId1 (PK) …
0
votes
1 answer

Why do I get a foreign key violation when I try to use NHibernate Session to save to a bridge table containing composite key?

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
0
votes
1 answer

A way to config the Build Action for NHibernate mapping .hbm.xml file?

Is there a way to configure the Build Action for an NHibernate mapping .hbm.xml file from within the NHibernate mapping .hbm.xml file itself or at the very least another configuration xml file? As much as I appreciate many of Microsoft Visual Studio…
crazyTech
  • 1,379
  • 3
  • 32
  • 67
0
votes
1 answer

SaveOrUpdate skipping table

Hibernate V.4.1.8 Final Spring: 3.1.3 Release Scenario: During customer registration process, user will fill complete from. He is allowed to save form multiple times before finalizing form and clicks submit to finalize contents. Application will…
Shirish Bathe
  • 627
  • 9
  • 22
0
votes
1 answer

Hibernate Map with unknown element type

I'm wondering if it's possible to define a map with unknown (Object) element type. I have an object with the following map defined: Map attributes = new HashMap(); Sometimes an attribute can be a String and sometimes…
Nimrod
  • 153
  • 3
  • 8
0
votes
1 answer

Netbeans generate hbm.xml files from multiple shcemas of database

i am using netbeans, I am generating POJO and hbm.xml files from a database, but i am able to generate only from one schema only. But I need to create from two different schemas and its tables have cross reference or relationship. How can I do it in…
Olzhas
  • 235
  • 2
  • 7
  • 21
0
votes
1 answer

If name attribute (class element) is optional, how does Hibernate know to which class to map the table?

As per documentation (search 'name (optional): the fully' string to locate the sentence), name attribute of class element is optional in mapping (hbm.xml) file. If so, how does Hibernate know to which class to map the table? Thanks in advance.
user1418717
  • 425
  • 2
  • 5
  • 13
1 2 3 4
5