mirror of
https://gitee.com/jmix/cuba.git
synced 2024-11-30 02:07:41 +08:00
Entity cache doesn't work for UUID entities on the MSSQL #1308
This commit is contained in:
parent
a2a4f760b8
commit
b8dbbad25e
@ -18,12 +18,19 @@ package com.haulmont.cuba.core.sys.persistence;
|
||||
|
||||
import org.eclipse.persistence.platform.database.SQLServerPlatform;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
public class CubaSQLServerPlatform extends SQLServerPlatform {
|
||||
|
||||
@Override
|
||||
public Object convertObject(Object sourceObject, Class javaClass) {
|
||||
if (sourceObject != null && sourceObject.getClass().getName().equals("microsoft.sql.DateTimeOffset"))
|
||||
if (sourceObject != null && sourceObject.getClass().getName().equals("microsoft.sql.DateTimeOffset")) {
|
||||
return super.convertObject(sourceObject.toString(), javaClass);
|
||||
}
|
||||
|
||||
if (sourceObject instanceof UUID && javaClass == String.class) {
|
||||
return sourceObject.toString().toUpperCase();
|
||||
}
|
||||
|
||||
return super.convertObject(sourceObject, javaClass);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user