In my EJB3 project I had to use specific hibernate mapping information in my POJO class (The "org.hibernate.type.YesNoType" column definition for example).
But if for any reason I have to move my project to another EJB3 server (and it doesn't use hibernate in the persistent layer) I'll be forced to chance all references of the Hibernate specifics to another solution.
These Hibernate specifics helped me in so many common situations, but is there a way to avoid them, or maybe "hide" them from the source code?
they are only needed at compile time, not at run time.
if you don't want mapping details in source code use jpa xml overriding or hbm.xml's.