Message:
A new issue has been created in JIRA.
---------------------------------------------------------------------
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: Blocker
Project: Hibernate2
Components:
core
Versions:
2.0.1
Assignee:
Reporter: Mike Gorman
Created: Thu, 26 Jun 2003 8:05 AM
Updated: Thu, 26 Jun 2003 8:05 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
|