CMDBuild Forum

Query order by is case sensitiv sorted

Hello,

i have noticed that in my cmdbuild intallation string fields are case Sensitive sorted. But in online demo from cmdbuild are sorted case insensitve. Example.
My Ubuntu with Postgres und C.UTF8 Collation
| Code |
| A |
| B |
| a |
| b |

demo cmdbuild org
| Code |
| a |
| A |
| b |
| B |

There a lot of info for Collation, UCI collations Postgres …but it is far from clear.

Can @tectnoteca maybe shared that config with us? or does anyone know the solution?

Thank you.

It was too easy:

only create the DB whit en_US.utf8 Collation or similar like de_DE.utf8 or es_ES.utf8

step by step:

  • Stop cmdb tomcat
  • generate in Linux, if not present (locale -a) the new locale:
    • locale-gen de_DE.utf8
  • Create DB
    • create database [NEW_DB] with template template0 owner [OLD_DB_OWNER] encoding UTF8 LOCALE ‘de_DE.utf8’;
  • Export OLD_DB
    • pg_dump [OLD_DB] > export_file.sql
  • Import OLD_DB in NEW_DB
    • psql [NEW_DB] < export_file.sql
  • Change database.conf file in cmdb
    • Edit [CMDB_INSTALL_DIR]/conf/cmdbuild/database.conf and change DB name
    • db.url=jdbc:postgresql://[host]:5432/[NEW_DB]
  • start CMDB