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

  • SEARCH
  • Home
  • 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 641537
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T21:04:24+00:00 2026-05-13T21:04:24+00:00

In my current project I am using a 3rd party library which has no

  • 0

In my current project I am using a 3rd party library which has no JPA annotations.

How can I persist objects from that library using JPA and external mappings?

  • 1 1 Answer
  • 1 View
  • 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-13T21:04:25+00:00Added an answer on May 13, 2026 at 9:04 pm

    Check this and this. In short:

    1. Create META-INF/orm.xml
    2. Follow (read) the .xsd

    You don’t have to manually map each column – only some specifics (i.e. collections and the id) are required. All fields are assumed to be columns (if the class is mapped). If there are no collections, something like this suffices:

    <?xml version="1.0" encoding="UTF-8" ?>
    <entity-mappings xmlns="http://java.sun.com/xml/ns/persistence/orm"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm 
        http://java.sun.com/xml/ns/persistence/orm_1_0.xsd"
        version="1.0">
    
        <description>External entities from library X</description>
        <package>com.external.library</package>
        <entity class="SomeClassName">
          <id>..</id>
        </entity>
        <entity class="AnotherClassName">
          <id>..</id>
        </entity>
    </entity-mapping>
    

    Note that when specifying <package> you don’t need fully-qualified names.

    In case you want a file named differently than orm.xml, in your persistence.xml specify it via:

    <mapping-file>customMappingFile.xml</mapping-file>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my current project, i am interacting with some 3rd party middleware that throws
I'm using zepto.js for my current project which has the same removeAttr() method as
In a current (C#) project we have a 3rd party assembly that contains a
I have a short question. Im my current project I'm using LINQ-to-SQl. That is
In my current project I'm using classes which implement the following ITransaction interface shown
For the current project we're using JSR-303 annotations to validate our interface parameters. I
I've forked a 3rd party git repo that uses maven, and I'm also using
On a current project I'm using a helper class to make API calls, which
For my current project I am using a boost::ptr_vector to hold Objects polymorphically, and
I'm using two tables for my current project(it will grow certainly). First table has

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.