2 Replies Latest reply on Jul 13, 2005 4:21 AM by any_key

    More Migration Woes

    ryoung2504

      I'm just migrating some code from Preview 5 to Beta.

      Previously I had an abstract class that had @Id and @Column annotations but no @Entity annotation on the class. I entended this with two classes that were annotated with @Entity. This gave me two tables with the same structure and no redundant code.

      Now when I try to deploy this pattern on the Beta version of EJB3 I get "org.hibernate.AnnotationException: No identifier specified for entity:"

      Short of moving the code from the abstract class into the two concrete classes (which will produce some duplication) is there a way to do this in the latest version of EJB3?

        • 1. Re: More Migration Woes
          epbernard

          The spec has clarified this area.
          map your superclass with @EmbeddedSuperclass (have a look at the doc for more infos)

          • 2. Re: More Migration Woes
            any_key

             

            "ryoung2504" wrote:
            I'm just migrating some code from Preview 5 to Beta.

            Previously I had an abstract class that had @Id and @Column annotations but no @Entity annotation on the class. I entended this with two classes that were annotated with @Entity. This gave me two tables with the same structure and no redundant code.

            Now when I try to deploy this pattern on the Beta version of EJB3 I get "org.hibernate.AnnotationException: No identifier specified for entity:"

            Short of moving the code from the abstract class into the two concrete classes (which will produce some duplication) is there a way to do this in the latest version of EJB3?


            Look at http://www.jboss.org/index.html?module=bb&op=viewtopic&t=66161