The following comment has been added to this issue:
Author: Gavin King
Created: Tue, 8 Jul 2003 7:04 PM
Body:
How exactly is this different to the existing <set where="..."> attribute?
---------------------------------------------------------------------
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: Unassigned
Priority: Minor
Project: Hibernate2
Versions:
2.0.1
Assignee:
Reporter: Christian Bauer
Created: Tue, 8 Jul 2003 3:36 PM
Updated: Tue, 8 Jul 2003 3:36 PM
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
|