Beginner |
|
Joined: Tue Aug 09, 2005 1:34 am Posts: 26 Location: Bangalore
|
Hi,
I am a newbie in this forum.
Well in our application we r using Hibernate with Springs FrameWork.
I get the following error in my application: -
ERROR: videoshowtemplate is not mapped.
when i implement the code for Joined SubClasses using Hibernate Annotations. I have a class called ShowTemplate which is the Base class and a child class called as VideoShowTemplate which are POJOs. I need to do the data retrieval from the ShowTemplate and VideoShowTemplate but I get an error I configured my SpringApplicationContext.xml for my interface and I configured my POJOs in the same xml.
I used the following annotations and code : -
@Entity()
@Table (name = "SHOWTEMPLATE")
@Inheritance(strategy=InheritanceType.JOINED )
@javax.persistence.NamedQueries({
@javax.persistence.NamedQuery(name=ShowTemplate.GET_SHOW_TEMPLATE, queryString="select p from showtemplate p")
})
public class ShowTemplate {
private int templateId ;
private String name ;
public static final String GET_SHOW_TEMPLATE "ShowTemplate.getShowTemplate";
and I wrote the method for getShowTemplate in my Service.
the code I used in my derived class is: -
@Entity(access=AccessType.FIELD)
@Table (name = "VIDEOSHOWTEMPLATE")
@Inheritance(strategy=InheritanceType.JOINED)
@InheritanceJoinColumn(name="TEMPLATEID")
public class VideoShowTemplate extends ShowTemplate {
public static final String GET_VIDEO_SHOW_TEMPLATE = "VideoShowTemplate.getVideoShowTemplate";
private String subTitle ;
now the error I get is
*** ERROR: videoshowtemplate is not mapped.
|
|