Currently several of Liferay's services are storing localized fields as XML String in a DB column. Some "famous" ones are:
This is causing severe issues like:
- . Probably for this reason we generate so many search indexes and we delegate the queries to index search instead of database search. In fact the following properties set to false are not working properly:
- causing errors saving records which exceed the limit (see LPS-40069,
LPS-53164, LPS-34209, LPS-39668, LPS-44439, LPS-54312for example)
- This is even worse for Oracle when there is a size limit for Varchar (4000) or for DB2 where we have to define the page size in advance. So finally we have to since this kind of fields can't be part of some SQL clauses like DISTINCT or GROUP (see
- With this kind of fields since we need to store a whole XML with useless information.
It's important to take into account for the future solution that changing localized fields from XML to JSON would be just a patch since we only save characters, not the rest of the issues.