Uploaded image for project: 'EJB 3.0'
  1. EJB 3.0
  2. EJBTHREE-68

EJB3 Preview 3 broke joined-subclasses

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • Preview 4
    • Preview 3
    • None
    • None

    Description

      In short, the problem is that the @Table annotation is ignored in subclasses when using the JOINED strategy.

      Best described by example. Take three classes: Account, BillingAccount, and ProductAccount. The latter two classes inherit from the first class using the JOINED strategy. All three classes also have a @Table annotation to specify the table name. In the case of the class "Account", the table name is "accounts". In the case of the class "BillingAccount", the table name is "accounts_billing" and in the case of the class "ProductAccount", the table name is "accounts_products".

      The problem is seen in this output from the server log. Notice that the @Table attribute is honored for the superclass, but ignored for the subclasses (instead, the default table name, which is the same as the class name, is used).

      15:04:38,096 INFO [HbmBinder] Mapping class: Account -> accounts

      15:04:38,100 INFO [HbmBinder] Mapping joined-subclass: ProductAccount -> ProductAccount

      15:04:38,103 INFO [HbmBinder] Mapping joined-subclass: BillingAccount -> BillingAccount

      Attachments

        Activity

          People

            patriot1burke@gmail.com Bill Burke (Inactive)
            ttarhan_jira Tolga Tarhan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 1 hour
                1h
                Remaining:
                Time Spent - 30 minutes Remaining Estimate - 5 minutes
                5m
                Logged:
                Time Spent - 30 minutes Remaining Estimate - 5 minutes Time Not Required
                30m