Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for JavaType.UUID #2412

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Junit Fix
Cédric de Launois committed May 10, 2024
commit 508aae1b11f5f15909c10b7cd4adcccf9472f0b1
Original file line number Diff line number Diff line change
@@ -113,13 +113,15 @@ private void testSetObject(Object obj, int id, PreparedStatement pstmt,
try (SQLServerResultSet rs = (SQLServerResultSet) pstmt.getResultSet()) {
rs.next();

if (GuidTest.TestType.SETNULL == testType) {
if (TestType.SETNULL == testType) {
String s = rs.getUniqueIdentifier(1);
assertNull(s);
assertTrue(rs.wasNull());
} else {
assertEquals(obj, UUID.fromString(rs.getUniqueIdentifier(1)));
assertEquals(obj, rs.getObject(1, UUID.class));
UUID expected = obj instanceof UUID ? (UUID) obj : UUID.fromString(obj.toString());
assertEquals(expected, UUID.fromString(rs.getUniqueIdentifier(1)));
assertEquals(expected, UUID.fromString(rs.getObject(1, String.class)));
assertEquals(expected, rs.getObject(1, UUID.class));
}
}
}