details: https://code.openbravo.com/erp/stable/2.50/rev/dcf09d553ca0 changeset: 9679:dcf09d553ca0 user: Javier Etxarri <javier.echarri <at> openbravo.com> date: Fri Sep 30 12:31:26 2011 +0200 summary: Fixes issue 18475: sequence number is reset when a dataset include a sequence with the same name
details: https://code.openbravo.com/erp/stable/2.50/rev/2252a735b722 changeset: 9680:2252a735b722 user: Javier Etxarri <javier.echarri <at> openbravo.com> date: Mon Oct 03 12:41:55 2011 +0200 summary: issue 18413 details: https://code.openbravo.com/erp/stable/2.50/rev/4ea4016ee815 changeset: 9681:4ea4016ee815 user: Javier Etxarri <javier.echarri <at> openbravo.com> date: Thu Oct 06 11:08:51 2011 +0200 summary: issue 18675. Trl tables will be matched by unique constraint on the DAL reference data import process. diffstat: src-db/database/model/tables/AD_ORG.xml | 2 +- src/org/openbravo/dal/xml/BaseXMLEntityConverter.java | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diffs (32 lines): diff -r 9f9b012c73c4 -r 4ea4016ee815 src-db/database/model/tables/AD_ORG.xml --- a/src-db/database/model/tables/AD_ORG.xml Wed Oct 05 09:42:47 2011 +0000 +++ b/src-db/database/model/tables/AD_ORG.xml Thu Oct 06 11:08:51 2011 +0200 @@ -61,7 +61,7 @@ <default><![CDATA[N]]></default> <onCreateDefault><![CDATA['N']]></onCreateDefault> </column> - <column name="SOCIAL_NAME" primaryKey="false" required="false" type="VARCHAR" size="60" autoIncrement="false"> + <column name="SOCIAL_NAME" primaryKey="false" required="false" type="NVARCHAR" size="60" autoIncrement="false"> <default/> <onCreateDefault/> </column> diff -r 9f9b012c73c4 -r 4ea4016ee815 src/org/openbravo/dal/xml/BaseXMLEntityConverter.java --- a/src/org/openbravo/dal/xml/BaseXMLEntityConverter.java Wed Oct 05 09:42:47 2011 +0000 +++ b/src/org/openbravo/dal/xml/BaseXMLEntityConverter.java Thu Oct 06 11:08:51 2011 +0200 @@ -161,8 +161,15 @@ // if there is a matching object in the db then that one should be // used protected BaseOBObject replaceByUniqueObject(BaseOBObject bob) { + BaseOBObject otherUniqueObject = null; if (bob.isNewOBObject() && bob.getEntity().getUniqueConstraints().size() > 0) { - final BaseOBObject otherUniqueObject = entityResolver.findUniqueConstrainedObject(bob); + if (bob.getEntity().getTableName().toLowerCase().endsWith("_trl") + || ("".equals(bob.getId()) || bob.getId() == null)) { + // We want to match by unique constraint only in the case the bob doesn't have id, or + // belongs to a _trl table (which have ids which are randomly generated by the + // verify_language process) + otherUniqueObject = entityResolver.findUniqueConstrainedObject(bob); + } if (otherUniqueObject != null && otherUniqueObject != bob) { // now copy the imported values from the bob to // otherUniqueObject ------------------------------------------------------------------------------ All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity and more. Splunk takes this data and makes sense of it. Business sense. IT sense. Common sense. http://p.sf.net/sfu/splunk-d2dcopy1 _______________________________________________ Openbravo-commits mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openbravo-commits
