Bug 138010 - Foreign keys in hibernate objects
Summary: Foreign keys in hibernate objects
Alias: None
Product: Red Hat Network
Classification: Red Hat
Component: RHN/R&D
Version: RHN Devel
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Michael Bowman
QA Contact: Red Hat Satellite QA List
Depends On:
Blocks: rhnMilestone1
TreeView+ depends on / blocked
Reported: 2004-11-03 20:07 UTC by Michael Bowman
Modified: 2007-04-18 17:14 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2004-11-08 15:07:08 UTC

Attachments (Terms of Use)

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

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. 

- 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:

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

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