I use Netbeans as IDE and use the wizards to generate Entities. If I want to define custom NamedQueries (not the ones auto generated) how can I define those outside of the entity so I don't lose them if I have to recreate the entity using the wizard?
+1
A:
You can add the custom named queries instead like:
<persistence-unit>
...
<named-query name="xxxxxx">
<query>
<![CDATA[
SELECT x FROM XXXXXXXX x
]]>
</query>
</named-query>
</persistence-unit>
javydreamercsw
2010-09-14 19:22:15
Found the answer myself after some more investigation.
javydreamercsw
2010-09-23 13:58:17