[hibernate-issues] [Hibernate-JIRA] Created: (HCANN-32) Discriminator for Single table per class hierarchy (2.2.4.2) should be optional

Tobias Marx (JIRA) noreply at atlassian.com
Sat Dec 11 14:47:13 EST 2010


Discriminator for Single table per class hierarchy (2.2.4.2)  should be optional
--------------------------------------------------------------------------------

                 Key: HCANN-32
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HCANN-32
             Project: Hibernate Commons Annotations
          Issue Type: Improvement
    Affects Versions: 3.2.0
            Reporter: Tobias Marx


If a Single table per class inheritance is used for cases as shown in the documentation, this makes perfect sense to need a Discriminator column.

However, in many scenarios, no Discriminator is needed as there will only different represenations of the same object.

Example:

One library defines a User entity.

In order to separate different Security implementations from each other, another library can extend this User Object, e.g.
as an ExtendedUser.

Some classes will query the table with less columns and call it "User" - some will query the same table in parallel as "ExtendendUser" - so no discriminator is needed - and adding an additional column makes now sense.

The colunns needed are already defined in the entities themselves.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list