Maybe I might.
I know with JPA, there were many things that annoyed me. I don't think it was worth it.
For example, class A contains a List of class B... and we actually have to say that the B's are mapped by A in the annotation... even though we know this from the code itself.
Common things like billingAddress and shippingAddress have very, very messy annotations to adjust the column names. It wasn't enough to put @Embedded/@Embaddable on them... we have to add attribute overrides for every column name. To me, this is very bloated since all I really wanted to tell JPA was, "put billing_ and shipping_ in front of all of these."
Imagine if the address had 100 columns in it? Man, that would be 200 attribute overrides.
And maybe I just don't know what the heck I'm doing ;)
I also though the mapped superclass didn't work as expected. When I put an "id" property in a DomainObject base class, I had to override the column name in every sub class. YUCK.
There is a philosophy with JPA though that stresses specifying "what needs to happen" as opposed to "what doesn't need to happen". To me, the later would have been less configuration heavy. Saying, "Don't map this" would have happened far less frequently than saying "map this" - whether that's a property, a super class, or a component class.
To me, that's JPA's failing. I realize it wasn't made with these intentions in mind... so that's why I think it can be improved.
I'd love to write a new set of annotations and have a pre-processor framework act on them to establish the mappings. I know it wouldn't work for ALL applications. It would definitely "expect" a lot of convention for it to work. Still, as long as the conventions were natural and sensible, I think people would like it.
|