Re: problem using subclass object as query parameter

2010-09-26 Thread javadia...@gmail.com
Hi again everyone I could not resolve this problem. I have to change all similar queries in my application to something like this(select b from Branch b where b.id=:branchID),This time it works. I think this is an openJPA bug .Do you agree? Anyone can test it . Thanks Ahad -- View this message i

Re: problem using subclass object as query parameter

2010-09-18 Thread javadia...@gmail.com
I am sorry for being late I removed the type column (private BaseBranchType baseBranchType) form BaseBranch class but the problem still exists mike. -- View this message in context: http://openjpa.208410.n2.nabble.com/problem-using-subclass-object-as-query-parameter-tp5506089p5545802.html Sent f

Re: problem using subclass object as query parameter

2010-09-10 Thread Michael Dick
Sorry it took a little while to get back to this thread. Is there a reason why you want to expose the discriminator column as a persistent property (you have the column TYPE mapped as an enum & as the discriminator col). I think this is causing the problems you're seeing. I haven't checked the s

Re: problem using subclass object as query parameter

2010-09-08 Thread javadia...@gmail.com
Hi mike thank you I am using openJPA 1.2.1 and I also have tested it with 1.2.2 . It doesn't work with both of them. I have tested it with runtime and build time enhancement.The problem exists with both. and my persistence.xml is something like this ---

Re: problem using subclass object as query parameter

2010-09-07 Thread Michael Dick
Hi, The where clause in the query is obviously wrong : WHERE (1 <> 1) // always returns false We've seen similar statements with embedded objects on earlier versions of OpenJPA (1.2.1 comes to mind). Which version of OpenJPA are you using, and are you doing build time or runtime enhancemen