On Oct 22, 9:18 am, Thomas Mueller <[email protected]> wrote: > Hi, > > > How do expressions work with OTHER datatype? > > It compares the byte array. See > alsohttp://h2database.com/html/datatypes.html#other_type > > > could it be added as feature request? > > Sure. It's not one of my priorities, but I can add a feature request. > I would need to know how would "Hi" (in this case) be converted to an > object of the given class? Or would you call the objects toString() > method and use String compare? In that case the security problems are > relatively low I guess.
I've already worked around my particular case, but the original idea was that using equals() and compareTo() comparisons would be a logical extension to the ability of storing arbitrary objects in the DB (via serialization). But this would require converting to actual objects in the server side in order to compare them, and it's definitely a performance issue, and also a security issue (although it really depends on who's allowed to put what in the DB). I'll keep thinking if I come up with some ideas, but currently I'm not sure if this feature request is that good after all. Doing it via toString() would be adequate for objects whose String representation fully describes the object (i.e. a fromString() factory method could be used to reconstruct the objects), but if that's the case, then it's probably better to just store Strings in the first place Thanks, Joonas -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/h2-database?hl=en.
