Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JPA makes a query on the extended entity why ?

 
Mikael Molin
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a class A that extends class B, when openjpa make a query it will query o class B which doesnt exists in the database, Does anyone know why this happens.

Class A



Class B



the error i get is this which means that DB2 is not finding that table name under the schema, and that is correct because only class A has @entity annotated

<openjpa-2.1.2-SNAPSHOT-r422266:1548248 fatal general error> org.apache.openjpa.persistence.PersistenceException: "B" is an undefined name.. SQLCODE=-204, SQLSTATE=42704, DRIVER=3.64.82
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!