Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 237295 - private owned is being support for BasicCollection and BasicMap
Summary: private owned is being support for BasicCollection and BasicMap
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 238441
  Show dependency tree
 
Reported: 2008-06-16 11:24 EDT by Karen Butzke CLA
Modified: 2022-06-09 10:29 EDT (History)
3 users (show)

See Also:


Attachments
Code changes (8.20 KB, patch)
2008-07-11 13:09 EDT, Guy Pelletier CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Karen Butzke CLA 2008-06-16 11:24:50 EDT
BasicCollectionAccessor is processing the PrivateOwned annotation when privateOwned should always be true for a BasicCollection and BasicMap.

This can also be configured in the xml, but it is then ignored in BasicCollectionAccessor.setPrivateOwned(boolean) since it is just set to true
Comment 1 Karen Butzke CLA 2008-06-16 16:07:13 EDT
javadocs for org.eclipse.persistence.annotations.PrivateOwned should also be updated.  It says:
 * A PrivateOwned annotation can be used in conjunction with a BasicCollection, 
 * BasicMap, OneToOne, and OneToMany annotation.
Comment 2 Karen Butzke CLA 2008-06-25 13:24:04 EDT
private-owned element also exists in the eclipselink orm schema under basic-collection and basic-map
Comment 3 Karen Butzke CLA 2008-06-25 13:40:59 EDT
Adding to this, I believe that privateOwned is also supported by VariableOneToOneMapping, which looks to be the case in VariableOneToOneAccessor.  The eclipselink-orm.xsd does not have support for private-owned in a variable-one-to-one mapping. 

Another place to update is LoggingLocalizationResource

key = "annotation_warning_ignore_private_owned"

value = "Ignoring @PrivateOwned on element [{1}] within entity class [{0}]. A @PrivateOwned can only be used with a @BasicCollection, @BasicMap, @OneToOne and @OneToMany." },
Comment 4 Karen Butzke CLA 2008-06-25 14:30:08 EDT
(In reply to comment #3)
> The eclipselink-orm.xsd does not have support for
> private-owned in a variable-one-to-one mapping.

I am wrong about this, it is in the schema
Comment 5 Guy Pelletier CLA 2008-07-11 13:09:25 EDT
Created attachment 107221 [details]
Code changes
Comment 6 Guy Pelletier CLA 2008-07-11 13:59:29 EDT
Fix submitted.

Reviewed by: Tom Ware

No new tests were added, N/A, useless code removed.
Comment 7 Eclipse Webmaster CLA 2022-06-09 10:29:14 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink