Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0016208Openbravo ERPA. Platformpublic2011-03-10 16:212011-10-05 12:51
shuehner 
shuehner 
normalmajorhave not tried
closedduplicate 
5
 
 
Core
No
0016208: Dal-Identifier calculation is using wrong order among the identifier fields defined for the table.
If a table contains more than one field marked as identifier then the order among those fields is defined via the column ad_column.seqno (see i.e. ComboTableQuery_data.xsql or src-db/database/model/functions/AD_COLUMN_IDENTIFIER_SQL.xml).

DAL identifier calculation doesn't use this but instead reuses ad_column.position which is the standard order of the columns inside the table.

Example:
dal-identifier:
address spain - - Pamplona - 31002 - United States -
sql-identifier:
address spain - - 31002 - Pamplona - - United States

Which have different column ordering.
See attached diff for a junit testcase which exposes the issue for the table c_location, as it has identifier columns defined with an ordering different from the column order in the table.

When populating list of identifierColumns in org.openbravo.base.model.Table reorder the list by seq (which needs to be added to the mapping & file first).
No tags attached.
duplicate of defect 0018698 closed alostale Grid identifiers don't take seqno into account 
Issue History
2011-03-10 16:21shuehnerNew Issue
2011-03-10 16:21shuehnerAssigned To => shuehner
2011-03-10 16:21shuehnerModules => Core
2011-03-10 16:21shuehnerNote Added: 0034734
2011-03-14 10:56alostaleStatusnew => scheduled
2011-10-05 12:51alostaleRelationship addedduplicate of 0018698
2011-10-05 12:51alostaleStatusscheduled => closed
2011-10-05 12:51alostaleResolutionopen => duplicate

Notes
(0034734)
shuehner   
2011-03-10 16:21   
Note: problem most likely exists in 2.50 as well.