This is not a bug fix, it is a new feature. Adrian Crum Sandglass Software www.sandglass-software.com
On 5/23/2014 10:50 PM, [email protected] wrote:
Author: jleroux Date: Sat May 24 05:50:07 2014 New Revision: 1597243 URL: http://svn.apache.org/r1597243 Log: "Applied fix from trunk for revision: 1597239 " ------------------------------------------------------------------------ r1597239 | jleroux | 2014-05-24 07:09:39 +0200 (sam. 24 mai 2014) | 1 ligne Closes OFBIZ-5648 - Extend primary keys ------------------------------------------------------------------------ Modified: ofbiz/branches/release13.07/ (props changed) ofbiz/branches/release13.07/framework/entity/src/org/ofbiz/entity/model/ModelEntity.java Propchange: ofbiz/branches/release13.07/ ------------------------------------------------------------------------------ Merged /ofbiz/trunk:r1597239 Modified: ofbiz/branches/release13.07/framework/entity/src/org/ofbiz/entity/model/ModelEntity.java URL: http://svn.apache.org/viewvc/ofbiz/branches/release13.07/framework/entity/src/org/ofbiz/entity/model/ModelEntity.java?rev=1597243&r1=1597242&r2=1597243&view=diff ============================================================================== --- ofbiz/branches/release13.07/framework/entity/src/org/ofbiz/entity/model/ModelEntity.java (original) +++ ofbiz/branches/release13.07/framework/entity/src/org/ofbiz/entity/model/ModelEntity.java Sat May 24 05:50:07 2014 @@ -47,8 +47,8 @@ import org.ofbiz.entity.Delegator; import org.ofbiz.entity.GenericEntity; import org.ofbiz.entity.GenericEntityException; import org.ofbiz.entity.GenericValue; -import org.ofbiz.entity.config.model.Datasource; import org.ofbiz.entity.config.EntityConfigUtil; +import org.ofbiz.entity.config.model.Datasource; import org.ofbiz.entity.jdbc.DatabaseUtil; import org.ofbiz.entity.model.ModelIndex.Field; import org.w3c.dom.Document; @@ -366,11 +366,15 @@ public class ModelEntity implements Comp this.fieldsList.add(newField); this.fieldsMap.put(newField.getName(), newField); if (!newField.getIsPk()) { - // this will always be true for now as extend-entity fields are always nonpks if (existingField != null) { this.nopks.remove(existingField); } this.nopks.add(newField); + } else { + if (existingField != null) { + this.pks.remove(existingField); + } + this.pks.add(newField); } } }
