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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T07:55:25+00:00 2026-05-30T07:55:25+00:00

I want to develop a DB structure where every object will go in its

  • 0

I want to develop a DB structure where every “object” will go in its own table. Say, objects are “house”, “car”, etc. The structure of the tables is the same for each object. The tables are named this way: common prefix and the name of object. Also every object has two associate tables that go in one-to-many relationship.

For this purpose I created a naming strategy that returns the name of the physical table based on the name of the object.

The problem is that I can receive an object that has no table so I need to create it. I tried with direct SQL query and it worked fine before adding some foreign relationships to the table. Now I receive the following exception:

Exception in thread "main" org.hibernate.DuplicateMappingException:  Table [INV_OBJECT_ATTRIBS] contains logical column name [id] referenced by
multiple physical column names: [INV_ATTRIB_ID], [INV_KEY_ID]

My question is:

Is it possible to ask Hibernate from within code to create a table based on .hbm.xml file? Something like session->createTableFromXML(...)?

  • 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-30T07:55:26+00:00Added an answer on May 30, 2026 at 7:55 am

    Yes, look at the Hibernate schema generation tools hbm2ddl:

    http://docs.jboss.org/hibernate/orm/3.3/reference/en/html/toolsetguide.html

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

Sidebar

Related Questions

I want to develop an application in which firstly i was develop an structure
If, by any chance, I want to develop my own remote assistance/screen sharing tool
I want to develop a hierarchical database to store directory structure in the filesystem.
I want to develop a windows application. If I use native C++ and MFC
I want to develop Java apps, real quick, what IDE should I choose?
I want to develop simple Serverless LAN Chat program just for fun. How can
I want to develop a mobile web application using asp.net 3.5 that can be
I want to develop a very simple 2D game in Python. Pygame is the
I want to develop an iPhone application using the utility template, where the flip
I want to develop ASP.NET C# based MMOG (Massively multiplayer online game). I would

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.