-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Retrieval using Joined subclasses with Hibernate Annotations
PostPosted: Sat Oct 08, 2005 10:33 am 
Beginner
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.


Top
 Profile  
 
 Post subject: help for annotations in hibernate for joined subclasses
PostPosted: Mon Oct 10, 2005 1:30 am 
Beginner
Beginner

Joined: Tue Aug 09, 2005 1:34 am
Posts: 26
Location: Bangalore
Hi,

Can anybody suggest me.
Why I am getting this error.
r else can anybody suggest where and how to debug??
Can anybody suggest me a good link where I can...
find good examples for hibernate annotations...

Thanks in Advance........

Manjith Kumar


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.