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

Documentation - How do I declare a method transient in hibernate hbm.xml file?

I want to declare a method transient in a hibernate entity, and we are using hbm.xml files for the mappings instead of annotations. I see sparse mentions online of people declaring fields transient in xml, declaring method transient with…
xdhmoore
  • 8,935
  • 11
  • 47
  • 90
0
votes
3 answers

nhibernate, stored procs

Can we call a STOREDPROC which inserts data into db which has no return value from NHIBERNATE? If so can any one please help me out with a small sample.
user669803
  • 11
  • 1
  • 4
0
votes
2 answers

Replacement for DirectPropertyAccessor?

I am upgrading a Spring 4.3.2 project to Spring 5.1.5. One of my test cases started failing with the error. ClassNotFoundException: org.hibernate.property.DirectPropertyAccessor Which makes sense since it has been deprecated in Hibernate 5.x which…
Vivek Shankar
  • 770
  • 1
  • 15
  • 37
0
votes
2 answers

getting invalid mapping exception when setting lazy=true in hibernate java

I want to use lazy="true" in hibernate while loading detail using Jersey in JAVA. But I getting error. (hbm version 5.1.3.Final) Here is my code:
unknownbits
  • 2,855
  • 10
  • 41
  • 81
0
votes
1 answer

Equivalent of @Size(max = 80) in hbm xml file for bean validation

I need to know the equivalent of @size annotation used in hibernate model classes, which we can use in the hbm.xml file. Little background : So I ran into this problem where a column size is specified as 255 in the database and I have restricted…
rj4u
  • 87
  • 10
0
votes
0 answers

How to delete from a joined table in hibernate?

Here's the code and what I'm trying to achieve is to remove a registration object from the registration table on delete. When I delete I want to remove it's corresponding certificate values in certificatesChosen table(which has primary keys id(from…
user8756643
0
votes
1 answer

Hibernate many-to-many set primary/foreign keys in thrid table

I have 3 java classes, two entites and the third is relationship between them. I want to map them in hbm.xml, but I don't know how, I can't find any example on internet public class Product { private String _description; private String…
0
votes
1 answer

xxx.hbm.xml not found but it actually exists

I get this error when I run Tomcat: Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [beans.xml]: Invocation of init method failed; nested exception…
user7693832
  • 6,119
  • 19
  • 63
  • 114
0
votes
1 answer

Translate hibernate mapping anotations to hbm.xml file

I have such hibernate mapping annotation and I need to translate it to xml one. @Entity @Table(name = "nodes") public class DefaultDiagramNode { ..... @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER, orphanRemoval = true) …
Ilya Kirillov
  • 29
  • 1
  • 6
0
votes
2 answers

Hibernate mapping with 2 foregin keys

Since yesterday I tried to fix this error . I do not know where is the problem with mapping db. Problems started out when I added courseSubcaegro Course hbm:
Faron
  • 123
  • 14
0
votes
1 answer

Hibernate and IllegalArgumentException

My hibernate mapping gives an error of: Exception in thread "main" org.hibernate.PropertyAccessException: IllegalArgumentException occurred calling getter of opdracht5.Category.id I cannot seem to figure out where it occurs... can someone help me…
0
votes
0 answers

Hibernate associative array (one to many) with null values

This is a very tricky issue. I'm using hibernate 3.6.8 and using hbm xml mappings. I has a case of a one to many relation that ends up in an array with null values. I read documentation on this about having indexes and such, but when I look into the…
cattox
  • 177
  • 2
  • 16
0
votes
1 answer

Nhibernate hbm to Fluent

I have a requirement to write the mapping using Nhibernate fluent. I have the following in hbm
Robert Dinaro
  • 508
  • 3
  • 8
  • 23
0
votes
1 answer

Hibernate One To Many Mapping 2 Levels

I have 3 Tables - Lease Account, Lease, Transaction. Each Lease Account has N Leases, each Lease has N Transactions. I am allowed to do only 1 query to the database - Select * from Lease Account, to fetch all this data into Java as N Lease Account…
Jay
  • 263
  • 3
  • 8
0
votes
1 answer

NHibernate errors when dealing with DBA bureaucracy

We have issues with too much red tape when dealing with changes to the database. Perhaps most strangely, this red tape applies to in-house developed testing tools that use a database schema that is never put into production. We can get changes…
scott.smart
  • 538
  • 5
  • 16