Generate Persistence Mapping

Hello,

The JPA support in EAP is exciting. However we're looking at incrementally building up an entity model for an existing database structure and have run into a few issues. First when generating a model for the entire database all goes well. But when turning on "Show Default Mappings" and selecting only a few entities and their relationships to each other nothing is generated. The mapping fields turn red if the entity isn't in the generate list, that is very nice. But when you get a subset of the database to be all clear and click the go button, you are asked to confirm generation but are never asked which source root to place the files in and no files are generated.

Also, regenerating entities that have already been generated and perhaps modified does not seem to merge correctly. I've seen two things happen so far. One is the same behavior as above, possibly for the same reason. Two is the generated code is merged into the existing code sometimes with conflicting annotations.

Anyway, things are looking very good indeed.

Thank you,

--
Tim

1 comment
Comment actions Permalink

Hello Tim,

The first issue is very strange.
Correct me if I'm wrong, the problem is that if anything is excluded
from the list then nothing is generated, right?

As far as the second issue is concerned what merging policy you'd prefer?

Regards,
Gregory Shrago

Tim Fulmer wrote:

Hello,

The JPA support in EAP is exciting. However we're looking at
incrementally building up an entity model for an existing database
structure and have run into a few issues. First when generating a
model for the entire database all goes well. But when turning on
"Show Default Mappings" and selecting only a few entities and their
relationships to each other nothing is generated. The mapping fields
turn red if the entity isn't in the generate list, that is very nice.
But when you get a subset of the database to be all clear and click
the go button, you are asked to confirm generation but are never
asked which source root to place the files in and no files are
generated.

Also, regenerating entities that have already been generated and
perhaps modified does not seem to merge correctly. I've seen two
things happen so far. One is the same behavior as above, possibly
for the same reason. Two is the generated code is merged into the
existing code sometimes with conflicting annotations.

Anyway, things are looking very good indeed.

Thank you,

-- Tim

0

Please sign in to leave a comment.