java - How to specify SQL column type for a specific database in hibernate mapping file -


is possible set multiple sql column types hibernate property depending on dialect used ? if yes how ?

for example, if have column of type char[], create clob type oracle , text type in sql server.

the short answer "no, it's not possible".

the long answer "kind of, don't want that":

hibernate automatically to extent - is, when define (implicitly or explicitly) property of hibernate type, translate type appropriate rdbms-specific sql type. dialect , descendants responsible translation.

you influence how translation occurs - again, extent - extending dialect(s) you're working (like oracle or sql server) , registering own column types. you're better off relying on default hibernate type mappings, though.


Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -