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
1
vote
0 answers
Hibernate Many To Many XML Mapping Join Table with Extra Column
I'm having a hard time to figure this thing out. I have managed to create this type of mapping using annotations, but XML configuration is giving me headache for hours. These are my POJOs (getters ans setters are omitted):
public class Stock…

Rade Milovic
- 965
- 4
- 13
- 29
1
vote
1 answer
Using a named native sql query using xml mapping error
I'm using a named native SQL query using xml mapping, I need to use the mysql function AES_ENCRYPT and AES_DECRYPT but marked me syntax error but do not understand why. Now review it all and is well
I'm using a blob field to store the encrypted data…

adan
- 59
- 1
- 7
1
vote
4 answers
How to map this link table in cf-orm?
A 1---* A_B *---1 B
Table A has aID (PK), Table B has bID (PK),
table A_B has:
aID (PK, FK),
bID (PK, FK),
num
I tried
property name="A" fieldtype="many-to-one" cfc="A" fkcolumn="aID";
property name="B" fieldtype="many-to-one" cfc="B"…

Henry
- 32,689
- 19
- 120
- 221
1
vote
0 answers
How to debug coldfusion orm settings and mappings
I'm having trouble with a specific ORM cfclocation not being mapped correctly. Coldfusion is checking in the cfclocation I have provided and then cacheing the mapping in a different location so that when I try to load the entity it can't find the…

Rumpleteaser
- 4,142
- 6
- 39
- 52
1
vote
1 answer
How to create hbm.xml file for mysql view and how to add it in hibernate configuration?
I have created mysql view for two tables which are in different schema using JDBC, because hibernate is not providing any facility do the same. I am using entity_mode as dynamic-map, so I have to create hibernate configuration by adding documents of…

milind_db
- 1,274
- 5
- 34
- 56
1
vote
2 answers
Does hibernate check length of column?
I have only access to db and read-only access to hbm.xml files. It is need to increase column size. I see that in table/column definition in hbm.xml files for this table no attribute length. Should application work with increased column size in this…

user710818
- 23,228
- 58
- 149
- 207
1
vote
1 answer
Hibernate Criteria API with access="field" mapping
I have a problem when using Hibernate Criteria API:
var query = session.QueryOver().Where(param => param.Name == "myFilterName").List();
If a run this statement, a NHibernate.QueryException is thrown:
could not resolve property:…

Carlos
- 456
- 2
- 7
- 21
1
vote
2 answers
hibernate simple inheritance - OR - xml property import/include
Final goal:
Have a few java objects sharing the same base class persisted into a database while each one having its own self-contained table with all own/inherited objects, and a simple auto-generated by the database id.
Very simple requirement.…

Poni
- 11,061
- 25
- 80
- 121
0
votes
0 answers
hibernate composite-id returns null results
Just before anyone down rate this question, I want to say i have tried to search an answer for this problem for 2 days now without any answers. I have tried a lot but could not resolve it so posting it here. I have created a view in mysql DB. Using…

Abdus Samad
- 343
- 2
- 12
- 27
0
votes
0 answers
Hibernate SessionFactory not getting created due to inability to locate the my.hbm.xml files by mappingResource, see the screenshots
@Configuration class having one of the @bean declaration for hibernate SessionFactory. its mappingResource("hbm file path") method is not locating my.hbm.xml and hence getting "cannot be opened because it does not exists." I applied many strategies…

Arun Kumar Mudraboyina
- 769
- 9
- 32
0
votes
1 answer
I upgraded to Hibernate 6.0 and now I get Unknown Entity errors
Apologies for abusing the format, I'm not really asking a question here but I sure wish this would have shown up when I started banging my head against this wall two weeks ago.
I've inherited several large Java projects, using Spring and running on…

Zaleth
- 1
- 2
0
votes
1 answer
How to map a nullable enum to an integer in NHibernate?
I have an enum (which values are bit flags) as follows:
[Flags]
public enum ItemType
{
InventoryPart = 0x1,
Service = 0x2,
Discount = 0x4,
NonInventory = 0x8,
MiscellaneousCharge = 0x10,
InventoryAssembly = 0x20,
…

ActiveX
- 1,064
- 1
- 17
- 37
0
votes
1 answer
Hibernate 5 Association [] references an unmapped entity [] : origin(User.hbm.xml)
I'm STILL dealing with a non-Spring legacy application, with a matching legacy database that is not easily updateable, so I have to deal with the cards that were dealt me.
I'm moving this non-Spring app from Hibernate 3 to Hibernate 5 and I was…

tjholmes66
- 1,850
- 4
- 37
- 73
0
votes
1 answer
How to define one to many relationship for Hibernate Dynamic Models
I want to define one to many relation between two entities defined as dynamic models. Sample entities are provided below. one Order can have multiple items in it. Association needed to be defined on "ORDER_ID" column.
please have a look at
i am…

ke2
- 1
- 1
0
votes
1 answer
Hibernate - hbml.xml - Unidirectional set - one-to-many
Hello all and thanks for reading,
I have the following problem:
org.hibernate.boot.MappingException: Association
[com....core.complex.domain.Complex.outlayTypes] references an
unmapped entity [com....core.complex.domain.Complex.outlayTypes
I…

Juano7894
- 703
- 1
- 8
- 21