Questions tagged [hibernate-mapping]

Hibernate uses mapping metadata to find out how to load and store objects of the persistent class. The Hibernate mapping could be specified using configuration files or annotations.

Hibernate uses mapping metadata to find out how to load and store objects of the persistent class. The Hibernate mapping could be specified using configuration files or annotations.

This tag should be used for questions regarding issues with the definition of Hibernate mappings.

3217 questions
1
vote
1 answer
1
vote
2 answers

hibernate MappingException: Could not determine type for: java.util.Set

I'm new to Java and Hibernate (although I've familiar with the Entity Framework so understand a lot of the concepts) All I want to do is create a Table OrganisationNode which has the following fields: Id, Name and ParentId ParentId is Nullable and,…
Basic
  • 26,321
  • 24
  • 115
  • 201
1
vote
2 answers

Need help with Hibernate Mapping

I am trying to create a dashboard for a homegrown solution that collects native performance related statistics of application servers. Here's the DDL for the data that's been gathered by various agents. I have skipped few columns and non-relevant…
Andy
1
vote
0 answers

Unable to prevent Hibernate from opening too many connections

I'm using: Hibernate 3.6.8 with mySQL, Tomcat 6, JDBC connection pooling I've run into a problem where Hibernate is opening a large number of connections, which eventually causes my web app to not be able to get a new connection. At first I thought…
Ryan
  • 11
  • 2
1
vote
1 answer

Hibernate: org.hibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the session

I wonder why this exception happens although it's assured by Hibernate get/query methods to retrieve objects that are already available inside the Hibernate session in case those objects are required…
Florian Sager
  • 660
  • 8
  • 14
1
vote
0 answers

how to restrict hibernate to extend column or create new table for collection element

I have table called employee_project on my database which is already made with the following columnEMPLOYEE_NUMBER,PROJECT_CODE,START_DATE,END_DATE,PROJECT_ROLE. There is one to many relationship in between the employee and project for that i have…
henrycharles
  • 1,019
  • 6
  • 28
  • 66
1
vote
0 answers

Two Entity with Common identifier @id in HIbernate

I am Using Spring3+Hibernate 3.0. I Have two beans (@Entity) Projects And Participants. I want both beans(Projects and Participants) should have common @ID identifier it means projects and participants table will have common primary key. How Can I…
1
vote
0 answers

map hibernate object with liferay internal table - many to many relation

i would like to know - if possible - how can i map a hibernate object model to an internal liferay table 'user_'. My Hibernate Object model is: @Entity @Table(name = "imageviewer_crreviewprotocol") public class CRReviewProtocol implements…
thanili
  • 777
  • 4
  • 26
  • 57
1
vote
0 answers

hibernate named query with object

I put this in my District.hbm.xml file In my DaoImpl i want to access it like…
krackmoe
  • 1,743
  • 7
  • 29
  • 53
1
vote
1 answer

org.hibernate.QueryException: duplicate association path for @ManyToOne Criteria

I have two classes which has a relationship between them. These are com.edfx.adb.persist.Activity: package com.edfx.adb.persist.entity; import java.util.List; import javax.persistence.Column; import javax.persistence.FetchType; import…
1
vote
1 answer

Pagination is not working when calling MySQL Stored Procedure using Hibernate

I have a MySQL Stored Procedure click here for stored procedure and calling the Procedure using Hibernate Hibernate Code: int ps=5; SQLQuery query=session2.createSQLQuery("CALL AbsentReportproc(:_fromdate,:_todate)"); …
String
  • 3,660
  • 10
  • 43
  • 66
1
vote
1 answer

Hibernate Returning two Pojo's and display the results on jsp using jstl

I have my pojo classes Master: public class Master extends RecordSet{ private String empcode; private String empname; private String dept; public String getEmpcode() { return empcode; } public void setEmpcode(String empcode) { this.empcode…
String
  • 3,660
  • 10
  • 43
  • 66
1
vote
1 answer

SENSITIVE cursor "SQL_CURSH200C1" cannot be defined for the specified SELECT statement.. SQLCODE=-243, SQLSTATE=36001, DRIVER=4.13.127

For a query as simple as this one, DB2 is throwing SQL error for no reason when used in hibernate. I think i have all the settings of DB2 for hibernate properties right, cause some other queries are running fine. SQLException for SQL [/*…
shree dhar
  • 11
  • 3
1
vote
1 answer

hibernate not populating collection but query matches

I have a hierarchy of objects in hibernate. I am simply printing the hierarchy out by looping through the hierarchy. Everything prints out great until I get to the bottom of the hierarchy. I have a Group object which has a collection of Artifact…
Atma
  • 29,141
  • 56
  • 198
  • 299
1
vote
0 answers

could not parse mapping document from resource

I always get this error message when i call my servlet... failed:org.hibernate.InvalidMappingException: Could not parse mapping document from resource CarDetail.hbm.xml CarDetail.hbm.xml:
krackmoe
  • 1,743
  • 7
  • 29
  • 53
1 2 3
99
100