posted 16 years ago
A good question which I was asking myself also. A simple Query which deals with one Entity is simple. Just put them in the class where you define your entity. This keeps things simple.
I'm now struggling with queries with deals with more entities. In which entity I shall put them. Now I try to use some naming convention where I know where the named query is.
An alternative is defining the named query within the orm.xml. I believe this would be my final place, because it makes controlling and adjusting easier without adjusting your source code.
But I started just with named queries so maybe someone else knows better what is practical the best solution.
Remko (My website)
SCJP 1.5, SCWCD 1.4, SCDJWS 1.4, SCBCD 1.5, ITIL(Manager), Prince2(Practitioner), Reading/ gaining experience for SCEA,