dimanche 29 mars 2015

Add COLLATE clause to ORMLite index specification

The one field on my data class needs to be unique with another field. Using ORMLite (with Android), I am using the uniqueIndexName="unique_index_name" annotation for the fields in my data class.


The problem is, I actually want the string field in the unique index to be case insensitive. I see this can be achieved by adding a COLLATE NOCASE clause to the field in question when defining the index. Is this possible to add this clause using ORMLite? Another annotation that I missed in the docs?


Aucun commentaire:

Enregistrer un commentaire