[#775] Automatic re-attaching after deserialisation does not work when used with .fetchLazy()

This commit is contained in:
Lukas Eder 2011-07-30 18:14:39 +00:00
parent 68fe91e612
commit 27c49fde57

View File

@ -4434,6 +4434,22 @@ public abstract class jOOQAbstractTest<
finally {
register(null);
}
// [#775] Test for proper lazy execution after deserialisation
try {
q = create().selectFrom(TAuthor()).orderBy(TAuthor_LAST_NAME());
q = runSerialisation(q);
register(create());
Cursor<A> cursor = q.fetchLazy();
register(null);
assertEquals("Coelho", cursor.fetchOne().getValue(TAuthor_LAST_NAME()));
assertEquals("Orwell", cursor.fetchOne().getValue(TAuthor_LAST_NAME()));
}
finally {
register(null);
}
}
@SuppressWarnings("unchecked")