See replies below...
----- Original Message -----
From: "Steve Ebersole" <steve(a)hibernate.org>
To: "hibernate-dev" <hibernate-dev(a)lists.jboss.org>
Sent: Saturday, July 18, 2015 11:09:35 AM
Subject: [hibernate-dev] HQLScrollFetchTest
Gail, etal.
I have a lot of questions in regards to HQLScrollFetchTest:
1) First is the split between it and NoIdentityHQLScrollFetchTest. I do
not fully understand why this split exists. They test the same thing
(literally; NoIdentityHQLScrollFetchTest extends HQLScrollFetchTest and
just supplies a different mapping). The mapping says something about
Sybase requiring the pk to be an IDENTITY in order for it to support
scrolling results. But I could find no mention of that anywhere via google
search.
IIUC, NoIdentityHQLScrollFetchTest was created just to the same test methods using
dialects that don't support IDENTITY columns.
The mapping doesn't say that the PK needs to be an IDENTITY for sybase, it says it has
to have an "identifier column":
<!-- A numeric id must be the <id> field. Some databases (Sybase, etc.)
require identifier columns in order to support scrollable results. -->
I don't think there is any reason that the test needs to use an IDENTITY column. Using
<generator class="increment" /> should make the test work with all
dialects so there would be no need to NoIdentityHQLScrollFetchTest. I've tried running
HQLScrollFetchTest using class="increment" with SybaseASE15Dialect and it works
just fine.
2) HQLScrollFetchTest#testScroll is skipped for a huge list of
dialects. I
only even started looking at this class because this test is failing when I
try to run it against MySQL/MariaDB (these are not listed for skipping).
But looking at the test, there is no expectation that this should ever work
for any database. The reason being that we completely expect the user to
"properly order" the query results for scrolling queries with fetches. The
test does not do that. TBH, I do not know what Dialect this test would
actually pass against.
I see that you added "order by p.name asc, c.name asc", and I see what you mean
about testScroll without ordering the data. I don't know why there would be a test
that doesn't order the data properly.
I've tried changing the mapping for HQLScrollFetchTest to use "increment"
generator, removed the @SkipDialect annotations, and tested with sybase, SQLServer,
Oracle, and DB2. They all pass now.
AbstractHANADialect and TeradataDialect do not support IDENTITY columns. They should also
work with "increment generator, but I have not tested them.
I created HHH-9970 to remove NoIdentityHQLScrollFetchTest and to change HQLScrollFetchTest
to work with all dialects (AFAICT).
_______________________________________________
hibernate-dev mailing list
hibernate-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev