Print Page | Close Window

QueryStrategy Question

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2010
Forum Discription: For .NET 4.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=4634
Printed Date: 25-Mar-2025 at 8:45pm


Topic: QueryStrategy Question
Posted By: BillG
Subject: QueryStrategy Question
Date Posted: 05-Jan-2014 at 1:58pm
Is there any way to tell where the entity manager satisfied the data request from. i want to run a statement after a query and know which of the strategies it used.

Bill




Replies:
Posted By: DenisK
Date Posted: 07-Jan-2014 at 3:46pm
Hi Bill,

Yes there is. You can listen to the EntityManager.Queried event and detect what the ResolvedFetchStrategy is.

See  http://drc.ideablade.com/xwiki/bin/view/Documentation/query-client-lifecycle-events - http://drc.ideablade.com/xwiki/bin/view/Documentation/query-client-lifecycle-events  for more info.



Print Page | Close Window