I was reading the following post to package JSF pages into jar files, which is great for including only those modules of a system that a client needs: Packaging Facelets files (templates, includes, composites) in a JAR
I'd like to do something similar with JPA entity classes. Is there a way to define entities do that the relationships are option? Perhaps even have a persistence.xml that extends another persistence.xml in another package? I only want entity classes packaged with an application if our client needs that software extension.
I guess it really comes down to optional entity relationships, which doesn't seem to be supported with JPA annotations.
I'm thinking that the only solution is to have two two versions of the same entity, one with property and one without, and including one the version I want. Blah. This is a very week point of JPA, IMO. It's issues like these that I really miss the simplicity and dynamic nature of PHP. ;)