Message:
The following issue has been closed.
Resolver: Gavin King
Date: Sat, 2 Aug 2003 3:52 AM
Closing this, because the user didn't explain how the existing functionality is insufficient.
---------------------------------------------------------------------
View the issue:
http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-156
Here is an overview of the issue:
---------------------------------------------------------------------
Key: HB-156
Summary: Qualified one-to-many
Type: New Feature
Status: Closed
Priority: Minor
Resolution: DUPLICATE
Project: Hibernate2
Versions:
2.0.1
Assignee:
Reporter: Christian Bauer
Created: Tue, 8 Jul 2003 3:36 PM
Updated: Sat, 2 Aug 2003 3:52 AM
Description:
Ability to add static criteria to what would otherwise be a one-to-many relationship, to
make it into a one-to-one relationship. Example: Account has one-to-many relationship to
Address by way of address.account_id foreign key. However, there is only one "primary"
address for a given account, indicated in the datamodel by address.is_primary = 'Y' for
exactly one row for any given Account. Enhancement would let me create a property
"primaryAddress" on Account that is mapped like a one-to-many except that it also includes
something like "...AND primary = true".
This allows me to obtain an Account object and call getPrimaryAddress and have that SQL
query the address table "WHERE account_id = ? AND is_primary = 'Y'".
---------------------------------------------------------------------
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
|