details:   https://code.openbravo.com/erp/devel/pi/rev/e7effc11e1be
changeset: 18156:e7effc11e1be
user:      Augusto Mauch <augusto.mauch <at> openbravo.com>
date:      Mon Oct 08 14:03:36 2012 +0200
summary:   Fixes issue 21849: Column with same position are ordered by name

When all the database columns are listed in the readColumns method of 
ModelProvider, they were ordered by its position. If several columns had the 
same position, its order was not deterministic. Now the name of the column has 
been added to the order clause.

diffstat:

 src/org/openbravo/base/model/ModelProvider.java |  1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diffs (11 lines):

diff -r 4e56b87ebd32 -r e7effc11e1be 
src/org/openbravo/base/model/ModelProvider.java
--- a/src/org/openbravo/base/model/ModelProvider.java   Mon Oct 08 13:48:48 
2012 +0200
+++ b/src/org/openbravo/base/model/ModelProvider.java   Mon Oct 08 14:03:36 
2012 +0200
@@ -425,6 +425,7 @@
   private List<Column> readColumns(Session session) {
     final Criteria c = session.createCriteria(Column.class);
     c.addOrder(Order.asc("position"));
+    c.addOrder(Order.asc("name"));
     return c.list();
   }
 

------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to