This content has been marked as final.
Show 3 replies
-
1. Re: framework:entity-query called on pages that don't use it
pmuir Oct 27, 2007 6:14 AM (in response to david.spark)Not normal. Are you sure you have no reference to it in pages.xml somehow?
-
2. Re: framework:entity-query called on pages that don't use it
david.spark Oct 29, 2007 7:28 AM (in response to david.spark)So I've been digging about in my code and have discovered that the reason for these queries is not related to web.xml, it's just coincidence that similar queries are defined there. It's actually related to a particular Entity bean (and Entity beans in general I guess). I run a query which returns types of this Entity bean and it seems the extra queries are run for each field of the entity which is a join to another table and has the annotation:
@NotFound(action=NotFoundAction.IGNORE)
Removal of this annotation stops the queries from running but of course leads to an error when there's an entry in the table that doesn't have a corresponding value in the joined table.
So I guess now I ask if this is normal behaviour of @NotFound :-) -
3. Re: framework:entity-query called on pages that don't use it
pmuir Oct 31, 2007 8:02 AM (in response to david.spark)I guess its doing an initial query to see if any records can be found and then building the query correctly. But ask on the JPA forum.