Replies: 1 comment
-
That might be the first step. Create the 3 platforms and perhaps a 4th called "legacy". Then I can release that artifact such that PR's can depend on it. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
My company plans to use DB2 with ebean, but the current DB2 support of Ebean is not good enough. Some features are missing, or are not working properly.
DB2 platform exists from the beginning (at least since 2013), but there were no automatic tests in the past. So all new features of ebean are untested on the DB2 platform.
Now, with 2021/2022 we are able to spawn a DB2-docker container and run over 3000 tests against this platform.
After fixing the issues with constraint names, ~95% of them were passing. So we investigated some time to fix the rest of them.
Who is using DB2?
There are different DB2 families by IBM, that are often mixed up: https://en.wikipedia.org/wiki/IBM_Db2_Family
and they also have different limitations, features and sometimes will reqire also different SQL statements.
So I think, we should make a platform for each of these "dialects". @bigjimlefou has already started to start with a DB2ForIPlatform
It would be also great, if some people can help to run the tests against iSeries or z/OS (I have no access to these platforms)
List of fixes we have made
We had to update the max column length to 128, to get the tests working. Without this change, existing ebean tests will not start.
This will be a breaking change for users that are already using DB2 (should we force these users to Db2LegacyPlatform or should we force them to migrate their schema?)
@bigjimlefou ran in the same issue here DB2ForIPlatform
See Insert statement.
This should be compatible with IBMi and z/OS
This is a really ugly workaround with reflection With DB2 we require a workaround to get the IDs in a batch insert. See StackOverflow
@rbygrave, what do you think of this change? Should we route that to the Db2-Platform
exclude null keys
is supported since DB2 11.1 LUW,DB2 11 for z/OS - unfortunately, for IBMi we need a different syntax with
UNIQUE WHERE NOT NULL
It may be not available for elder versions
@rbygrave as far as I know, truncate should be used only in tests. Do you think, we can do a commit after each truncate (and do not check the platform)
This should be the complete list of fixes, now 3333 tests are passing in our CI
There are some more changes in test classes (asserts against generated sql etc) you may see in this commit list https://github.com/FOCONIS/ebean/commits/0d8d255f178390e2e3d8212aad2f48e11611b849
What to do next?
cheers
Roland
Beta Was this translation helpful? Give feedback.
All reactions