4

I have a question regarding the class integration in the persistence xml.

Is something like this possible?

<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
    <persistence-unit name="ranea">
        <class>com.dal.pojo.*</class>
    </persistence-unit>
</persistence>

I know that this does not work....but I have a rather big database structure and I would appreciate an answere how to include my pojo classes in the persistence unit easily.

2

1 Answer 1

2

If you're using Eclipse, you can right click on persistence and use "synchronize class list".

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.