Finally, I figured out the problem. Only the difference in your query was full class name is not specified but the entity name. I's using the fully qualified com.sample.entity.Account. When I changed it to 'Account', it worked! (I've updated to the latest version now).
But I tried changing the above test case to use fully qualified name, it worked! So may be I'm missing something. Anyway, It's working for me now. Thanks for your support and quick help. With Regards, Prashant On 7/25/07, Patrick Linskey <[EMAIL PROTECTED]> wrote:
Hmm. I was able to run a test that seems similar to what you've described, but works without a problem. Can you post the printout of the version of OpenJPA that you are using? You can get the value by running 'java org.apache.openjpa.conf.OpenJPAVersion' on the command line. See https://svn.apache.org/viewvc?view=rev&revision=559353 for the test case that I just added. -Patrick On 7/24/07, Prashant Bhat <[EMAIL PROTECTED]> wrote: > Hello Patrick, > > On 7/25/07, Patrick Linskey <[EMAIL PROTECTED]> wrote: > > > > Interesting.... the enum could also be the problem. What happens if > > you create a new constructor that doesn't have the enum param, and run > > the same query without the enum data? > > > Yes! It was enum causing the problem. Query is working when I removed enum > parameter. > > Can you describe what data you're trying to exclude from the query? I > > understand your desire to avoid tying yourself to a particular > > vendor's extensions, but in my opinion the benefits of living within > > the regular JPA world from a lifecycle standpoint outweigh the costs > > of living outside the JPA world for the query optimizations. > > > Thanks and yes, we hardly switch to another JPA implementation, so it is > better to make use of full features to optimize the application for better > performance. > > Note that from an API standpoint, you can use FetchPlans either via > > query hints (i.e., without importing OpenJPA classes) or via > > OpenJPA-specific APIs. This also means that you can externalize the > > hints into named query definitions as well. > > > Ok. I'll give it a try today. > > Thanks and Regards, > Prashant > -- Patrick Linskey 202 669 5907
