-->
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.  [ 3 posts ] 
Author Message
 Post subject: Problem schema export with @DependentObject
PostPosted: Wed Mar 30, 2005 4:10 pm 
Newbie

Joined: Wed Mar 30, 2005 3:39 pm
Posts: 4
Hi All,

Hibernate version: 3rc1
Hibernate-annotations: 3.0-alpha3

I get the following exception, when I try to generate a schema with classes which are annotated with @DependentObject:

Code:
org.hibernate.AnnotationException: Annotated class should have an @Entity annotation: org.hibernate.test.metadata.onetoone.ComputerPk
        at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:210)
        at org.hibernate.cfg.AnnotationConfiguration.addAnnotatedClass(AnnotationConfiguration.java:44)
        at org.hibernate.cfg.AnnotationConfiguration.parseMappingElement(AnnotationConfiguration.java:182)
        at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:1353)
        at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1335)
        at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1302)
        at org.hibernate.cfg.Configuration.configure(Configuration.java:1264)
...


I try this with the (unmodifed) hibernate example:

Code:
@DependentObject
public class ComputerPk implements Serializable {
....
}

Is this an open issue or did I something wrong?

Thanks for any help


Top
 Profile  
 
 Post subject: solved
PostPosted: Wed Mar 30, 2005 6:30 pm 
Newbie

Joined: Wed Mar 30, 2005 3:39 pm
Posts: 4
Hi All,

it seems that I have solved the problem. I removed the Component classes from the configuration and it works.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 31, 2005 7:11 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Year, only entities has to be declared in the configuration

_________________
Emmanuel


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.