Is it possible to define different types of columns using JPA depending on the database used?
I need to save id as uuid and it should be protable. This is problem. PostgreSQL has "uuid", MSSQL has a "uniqueidentifier", and Oracle has nothing, so I have to use "RAW".
Does anyone have an idea and can help me?
Edit: Currently, identifiers are created using java.util.UUID and stored in the database as varchar. But due to performance issues with this data type, I want to save identifiers as uuid type. For Oracle, you must use the RAW type because there is no uuid type. How can I say that JPA uses uuid type with PostgreSQ / MSSQL and RAW types with Oracle?
source
share