lock51 wrote:
I can suggest to use one string field for this and format each data type so it will be sortable. For examle int 1 will be 0000001 or longer if you want to store Long data type as well. Date will be 2008.05.24 11:48:00. In your class you can create accessors to do automatic conversion for each value. For example setProperty(int value), setProperty(Date value) and so on. You can store a datatype in separate column, so if you call accessor Object getProperty() the correct datatype will be returned.
Hmm, yes this is an idea. Do you think that if I create some special mapping types this might help me? With some work i could make this whole process transparent to upper levels. But I'm worried about data integrity if I append and cut 0's and other stuff all the time. Plus, to make sure cache works rights, i would need to implement very well the .equals method to make sure the int 1 and the string 0000001 are seen equal.