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 7003783
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T21:06:50+00:00 2026-05-27T21:06:50+00:00

I have a very simple issue, and I’m not sure if it’s a bug

  • 0

I have a very simple issue, and I’m not sure if it’s a bug in hibernate, or an issue with JPA 2.0.

I have a simple @Entity

@Entity
public class LegacyClearanceNodeMapping {
    @Id    
    @ManyToOne
    @JoinColumn(name="nid")
    private LegacyNode clearanceNode;

    @ManyToOne
    @JoinColumn(name="rentable_nid")
    private LegacyNode rentableNode;

    @Column
    private Integer quality;

    ..snip..

}

Essentially, it’s a Many-to-many map class, but it has meta-data on the association, so I can’t treat it that way.

When I try to startup hibernate though, I get the follwoing error:

org.hibernate.MappingException: Could not determine type for: 
com.***.inventory.model.clearance.LegacyNode, at table: LegacyClearanceNodeMapping, for columns: [org.hibernate.mapping.Column(clearanceNode)]
    at org.hibernate.mapping.SimpleValue.getType(SimpleValue.java:292)
    at org.hibernate.mapping.SimpleValue.createIdentifierGenerator(SimpleValue.java:175)
    at org.hibernate.cfg.Configuration.iterateGenerators(Configuration.java:743)
    at org.hibernate.cfg.Configuration.generateDropSchemaScript(Configuration.java:854)
    at org.hibernate.tool.hbm2ddl.SchemaExport.<init>(SchemaExport.java:128)
    at org.hibernate.tool.hbm2ddl.SchemaExport.<init>(SchemaExport.java:91)

I can only suspect that Hibernate doesn’t like the PK being a fk, but I can’t change the schema.

Any known resolutions?

Thanks

  • 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-05-27T21:06:50+00:00Added an answer on May 27, 2026 at 9:06 pm

    You must have a basic property mapped as ID, and a ManyToOne mapped on the same column, and using the @MapsId annotation.

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

Sidebar

Related Questions

I have a very simple issue: User model: class User < ActiveRecord::Base devise :database_authenticatable,
I have a very simple issue, but I am not able to find the
I appear to have a named pipes 101 issue. I have a very simple
I have a very simple constructor in ActionScript as the following: public function ButtonTest()
I have the following issue whith this very simple task. I want to create
My issue can be seen here: http://jasonnarciso.com/dev/cmwd/concrete-solutions/ Basically I have a very simple jquery
I am having a strange issue. I have a very simple piece of code
Here's my issue: I have a very simple html website teaser right now with
I have a very simple class using HttpListener to receive an HTTP POST from
i have very simple problem. I need to create model, that represent element of

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.