• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
  • Paul Clapham
Sheriffs:
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
Bartenders:
  • Mike London

Persistance Issue with EJB 3.0

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've defined the Inheritance strategy as InheritanceType.JOINED and got the entity class Vehicle and Truck extends Vehicle. I am using the derby database and have the tables created.

Vehicle has id(pk), name, wheels columns and Truck has id(fk), chase columns

When I try to persist these objects I am getting below exception. Please advice

Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2006.8 (Build 060830)): oracle.toplink.essentials.exceptions.DatabaseException
Internal Exception: org.apache.derby.client.am.SqlException: 'DTYPE' is not a column in table or VTI 'APP.VEHICLE'.Error Code: -1
Call:INSERT INTO VEHICLE (ID, WHEELS, NAME, DTYPE) VALUES (?, ?, ?, ?)
bind => [1493225404, 4, GMC Truck 1, Truck]
Query:InsertObjectQuery(com.fruit.persistance.Truck@f30c34)
 
Ramamoorthy Periasamy
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I actually figured out the problem. Thanks anyway
 
reply
    Bookmark Topic Watch Topic
  • New Topic