0

I have an existing sql schema file for db. Is it possible to generate and re-generate when needed DAO's entities and all other required helper/client classes to access it? I don't mind what will it be -- hibernate, other jpa or something else.

1 Answer 1

1

Asuming you/others are still looking for a solution:

I just got the same problem and got it working in Eclipse (slightly different) as follows:

  1. created JPA Project and downloaded & added user library in the wizard
  2. Also wanted to give a schema-sql-file as input but instead found a way to take an actual db as input. (That was surely much easier for the developers of the tool to process than parsing proprietary sql-script-files)
  3. To do that "rightclick" you jpa project an there "new/other/jpa/entities from tables"
  4. In the following Wizard you have to create a db-connection to the db whose schema you want to get as jpa-annotated POJOs (IMHO It's very intuitive..but you may ask if there is a problem)

  5. After finishing all jpa-classes are generated from the db...saved me from a lot of dummy work :)

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.