Bug 138010 - Foreign keys in hibernate objects
Foreign keys in hibernate objects
Status: CLOSED CURRENTRELEASE
Product: Red Hat Network
Classification: Red Hat
Component: RHN/R&D (Show other bugs)
RHN Devel
All Linux
medium Severity medium
: ---
: ---
Assigned To: Michael Bowman
Red Hat Satellite QA List
:
Depends On:
Blocks: rhnMilestone1
  Show dependency treegraph
 
Reported: 2004-11-03 15:07 EST by Michael Bowman
Modified: 2007-04-18 13:14 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-11-08 10:07:08 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Michael Bowman 2004-11-03 15:07:42 EST
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 15:11:58 EST
Fixed Address/User - webUserId
- added bi-directional mapping so given an address we can get the user.
Comment 2 Michael Bowman 2004-11-03 16:29:34 EST
Fixed EmailAddress/User - UserId

Note You need to log in before you can comment on or make changes to this bug.