joseaio created JDO-756:
---------------------------
Summary: Enhance PK to avoid LongIdentity/StringIdentity
dependencies
Key: JDO-756
URL: https://issues.apache.org/jira/browse/JDO-756
Project: JDO
Issue Type: Improvement
Reporter: joseaio
Fix For: JDO 3.2
Please see: JDO Guides : M-N Attributed Relation
http://www.datanucleus.org/products/accessplatform_3_1/guides/jdo/many_many_attributed/index.html
public class BusinessRelation{
private Customer customer; // PK
private Supplier supplier; // PK
BusinessRelation.PK requires:
public LongIdentity customer; // Use same name as BusinessRelation field
public LongIdentity supplier; // Use same name as BusinessRelation field
Instead in Customer and Suplier classes: the id is long
private long id; // PK
I think more convenient enhance BusinessRelation.PK to allow long types:
public long customer; // Use same name as BusinessRelation field
public long supplier; // Use same name as BusinessRelation field
note: the same for any other basic types (String, Dates,... included)
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)