Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8911429
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T03:56:29+00:00 2026-06-15T03:56:29+00:00

I have 2 Entity classes ParameterGroupBean and GroupLevelBean import javax.persistence.*; import java.util.ArrayList; import java.util.Collection;

  • 0

I have 2 Entity classes ParameterGroupBean and GroupLevelBean

import javax.persistence.*;
import java.util.ArrayList;
import java.util.Collection;


@Entity
@Table(name="tbl_ParameterGroups")
public class ParameterGroupBean {


@Id
@GeneratedValue
private int ParameterGroupId;
private String ParameterGroupName;  
private Boolean Status;

@ManyToOne
@JoinColumn(name="LevelId")
private GroupLevelBean level = new GroupLevelBean();

public GroupLevelBean getLevel() {
    return level;
}

public void setLevel(GroupLevelBean level) {
    this.level = level;
}

@Id
@GeneratedValue
public int getParameterGroupId() {
    return ParameterGroupId;
}

public void setParameterGroupId(int parameterGroupId) {
    ParameterGroupId = parameterGroupId;
}

@Column(length=120) 
public String getParameterGroupName() {
    return ParameterGroupName;
}

public void setParameterGroupName(String parameterGroupName) {
    ParameterGroupName = parameterGroupName;
}

public Boolean getStatus() {
    return Status;
}

public void setStatus(Boolean Status) {
    this.Status = Status;
}
}

GroupLevelBean:

import javax.persistence.*;
import java.util.ArrayList;
import java.util.Collection;


@Entity
@Table(name="tbl_GroupLevel")
public class GroupLevelBean {

private int LevelId;
private String LevelName;
@OneToMany(mappedBy = "level")
private Collection<ParameterGroupBean> parameterGroups = new ArrayList<ParameterGroupBean>();


public Collection<ParameterGroupBean> getParameterGroups() {
    return parameterGroups;
}

public void setParameterGroups(Collection<ParameterGroupBean> parameterGroups) {
    this.parameterGroups = parameterGroups;
}


@Id
@GeneratedValue
public int getLevelId() {
    return LevelId;
}
public void setLevelId(int levelId) {
    LevelId = levelId;
}
@Column(length = 30)
public String getLevelName() {
    return LevelName;
}
public void setLevelName(String levelName) {
    LevelName = levelName;
}   
}

The relationship between GroupLevelBean and ParameterGroupBean is one to many.
I am getting an exception when i try to create a session object.

org.hibernate.MappingException: Could not determine type for: com.vrde.daems.bean.GroupLevelBean, at table: tbl_ParameterGroups, for columns: [org.hibernate.mapping.Column(level)]

Can anyone tell me what is the problem?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T03:56:31+00:00Added an answer on June 15, 2026 at 3:56 am

    Because you are putting @Id and @GeneratedValue java persistence annotations above:

    @Id
    @GeneratedValue
    private int ParameterGroupId;
    

    and in same time above:

    @Id
    @GeneratedValue
    public int getParameterGroupId() {
        return ParameterGroupId;
    }
    

    Its enough just to put annotations above private int ParameterGroupId;

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have 2 classes @Entity @Table(name = user) public class User @Id @Column(name =
I have the following entity class (in Groovy): import javax.persistence.Entity import javax.persistence.Id import javax.persistence.GeneratedValue
Hi every one I have these classe @Entity @Table(name = login, uniqueConstraints={@UniqueConstraint(columnNames={username_fk})}) public class
I have the following scenario (in Java / Hibernate): I have two entity classes:
I have two entity classes annotated in the following way @Entity class A {
I have two Entity classes: Order and OrderItem . Order contains a navigation property
In my program I have numerous Entity classes with a Texture2D attribute that are
I have the following classes: public class Entity<T> where T : Entity<T> { public
I have the following classes generated by the Reverse engineering tool (Entity Framework Power
I have the following classes in my Model: public abstract class Entity : IEntity

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.