The following comment has been added to this issue:
Author: Tom Sedge
Created: Thu, 10 Jul 2003 8:23 AM
Body:
I recently wrote a custom persister that allowed this. I allowed lists (13,14), ranges (20-31), plus greater than and less than options.
Basically I allowed a comma-separated list in the discriminator and created a custom type to map the discriminator as a string. Then, inside my custom persister I converted this to numeric values and stored my own mapping of discriminator to subclass
---------------------------------------------------------------------
View the issue:
http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-172
Here is an overview of the issue:
---------------------------------------------------------------------
Key: HB-172
Summary: multiple discriminator-value for subclass
Type: New Feature
Status: Unassigned
Priority: Minor
Project: Hibernate2
Components:
core
Versions:
2.0.2
Assignee:
Reporter: Ludovic Orban
Created: Thu, 10 Jul 2003 1:59 AM
Updated: Thu, 10 Jul 2003 1:59 AM
Environment: any/all
Description:
It would be nice to allow a class or a subclass to have multiple possible discriminator values.
Hibernate would need to map the same subclass to multiple values and the resulting unmapped values to the root class (or some other subclass), using a mapping that could look like this:
<class name="pkg.RootObject" table="SOME_TABLE" discriminator-value="*">
...
<discriminator column="TYPE" type="integer" />
...
<subclass name="pkg.SubClassA" discriminator-value="12, 13">
<subclass name="pkg.SubClassB" discriminator-value="45">
</class>
---------------------------------------------------------------------
JIRA INFORMATION:
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
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
|