Bug 138010

Summary: Foreign keys in hibernate objects
Product: [Retired] Red Hat Network Reporter: Michael Bowman <mbowman>
Component: RHN/R&DAssignee: Michael Bowman <mbowman>
Status: CLOSED CURRENTRELEASE QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: medium Docs Contact:
Priority: medium    
Version: RHN Devel   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-11-08 15:07:08 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 125080    

Description Michael Bowman 2004-11-03 20:07:42 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20040914
Firefox/0.10

Description of problem:
Throughout our code, we have instances where foreign keys are being
used as valid attributes of an object. These should be removed since
hibernate maps these automatically between objects. 

Example:
- webUserId was in Address
- The User object has a one-to-many mapping on the web_user_id column.

If an object requires a bi-directional mapping, we should do that
instead of manually setting these foreign keys.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. Look around in our mappings for foreign key based attrs


    

Additional info:

Comment 1 Michael Bowman 2004-11-03 20:11:58 UTC
Fixed Address/User - webUserId
- added bi-directional mapping so given an address we can get the user.

Comment 2 Michael Bowman 2004-11-03 21:29:34 UTC
Fixed EmailAddress/User - UserId