Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JPA makes a query on the extended entity why ?  RSS feed

Mikael Molin
Ranch Hand
Posts: 33
  • 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
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!