]
Tobias Marx commented on HCANN-32:
----------------------------------
p.p.s: in the example a User is always an ExtendedUser and an ExtendedUser is always a
User. There is no case where a User/ExtendedUser is not an ExtendedUser/User at the same
time.
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
Original Estimate: 1h
Remaining Estimate: 1h
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: