• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JPA, Named Queries and ReverseEngeneering

 
Alexander Bischof
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

i have used a reverseengeneeringstrategy to generate ejb3 entity beans from my database model and added after that some named queries to some of the entity beans. Now i've to change some parts of the model so that the whole generation process must be repeated again (and maybe later again). But now i have to copy&paste all named queries from old to new. Is there a nicer workflow or best practice approach to handle this problem?

Kind regards
Alex Bischof
--------------------
SCJP1.4, SCJP5, SCJD
 
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper
Posts: 4968
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Naw, you've unfortunately created your own pain.

The only real best practice here is to really plan your domain model, and create something that doesn't have to be regenerated all the time.

This book is severly underrated, but I highly recommend it for planning object models. If you can get your hands on it, it's great. It's just filled with properly planned models from a multitude of industries:

Java Modelling in Color by Peter Coad

Best of luck!

-Cameron McKenzie
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic