Questions tagged [hbm]

A Hibernate (and NHibernate) feature that allows for both HQL and SQL queries to be stored in a file

A Hibernate (and NHibernate) feature that allows for both HQL and SQL queries to be stored in a file ending with *.hbm.xml. The main advantage is that your query is precompiled when the application starts up, and any errors in the query can be caught ahead of runtime.

165 questions
4
votes
1 answer

Fluent NHibernate and Stored Procedures

I have a basic Customer/Order/OrderItem/Product object graph. Customer has Many Orders, Order has Many Order Items, Product has many Order Items. These are successfully mapped using FNH. I've hit a snag with configuring a stored procedure &…
3
votes
0 answers

Nhibernate Filter in a Join table

I'll try to filter to have a one to one join in subclasses, I set the filter condition in key column field, in a simple query it works, in more complicated it does not resolve alias. is there a trick for setting the alias in the second…
Andreanta
  • 175
  • 1
  • 8
3
votes
3 answers

Generated full constructor contains too many params

I have a DB table with many, many fields that is causing an issue when I generate a POJO for that table using a Hibernate .hbm file. The issue is the full constructor being generated produces too many params for Java, which throws compiler…
WhyGeeEx
  • 459
  • 1
  • 5
  • 19
3
votes
2 answers

HQL Query on Set Property

Suppose that I have the following HBM mapping:
David
  • 299
  • 2
  • 6
  • 16
3
votes
1 answer

How do I map nested class into single database table using hibernate?

I only have table name called Employee, that table has all address attributes and I want to map using hibernate employee table and inner class of address attributes.
3
votes
0 answers

Hibernate provided id of the wrong type for class

Hy guys, I've an Hibernate question for you. I have a class mapped whit this hbm.xml file
3
votes
3 answers

generate annotated java class from hbm file

I have an old project in which java classes are generated from hbm files. Is it possible ,using these hbm files, to generate java classes with annotations?
senior
  • 2,196
  • 6
  • 36
  • 54
3
votes
2 answers

Nhibernate One-to-one mapping issue with child object insert error

i've being banging my head against the desk all day with the following Nhibernate problem. Each bank account has one (and only one) set of rates associated with it. The primary key of the bank account table, BankAccountID is also a foreign key and…
TalkDotNet
  • 81
  • 1
  • 7
3
votes
2 answers

NHibernate stored procedure problem

I'm having a hard time trying to get my stored procedure works with NHibernate. The data returned from the SP does not correspond to any database table. This is my mapping file:
Calvin
  • 31
  • 2
3
votes
1 answer

Modifying how nHibernate saves Saga data in nServiceBus

I'm having an issue where I'm sending a message to nServiceBus with a message data field of variable length. nServiceBus is using nHibernate to create a table called [NServiceBus].[PendingMentorEmailSagaData] from a class called…
RandomUs1r
  • 4,010
  • 1
  • 24
  • 44
3
votes
1 answer

How to map an NHibernate entity to a query

I've seen a number of examples of this, and as far as I can tell my HBM file follows the same pattern, but it's not working. First, the file:
Michael
  • 1,351
  • 1
  • 11
  • 25
3
votes
2 answers

Using hibernate 4 with hbm.xml and xsd

after much googling now confused and frustrated. I am upgrading an application from Hibernate 3 to 4. This works well using dtd 3.0 but now need to use the 4.0 xsd and this is where every thing goes base over apex! The app uses hbm.xml files to…
Ian
  • 412
  • 1
  • 4
  • 18
3
votes
2 answers

failed.org.hibernate.MappingException: Could not determine type for: String, for columns: [org.hibernate.mapping.Column(db col name)

I am using Net Beans IDE , When i start to deploy my web project it shows me at the console output an error says: failed.org.hibernate.MappingException: Could not determine type for: String, for columns: [org.hibernate.mapping.Column(db col…
shareef
  • 9,255
  • 13
  • 58
  • 89
3
votes
3 answers

Mandatory setter for primary key in Hibernate with hbm.xml

Is it possible to avoid setter for primary key with Hibernate XML mapping configuration? When annotations are used you don't have to have setter method declared. See example. I'm using Hibernate version 4.1.2. XML based configuration public class…
michal.kreuzman
  • 12,170
  • 10
  • 58
  • 70
2
votes
1 answer

How to add more hbm to existing mappingResources or existing hbm list in Spring

I have a parent-app, which includes sub-apps. My Parent app has its own included list of hbms
R K Punjal
  • 1,445
  • 1
  • 15
  • 20
1
2
3
10 11