-
Notifications
You must be signed in to change notification settings - Fork 16
Make conversion of RevisionType explicit to avoid failure using Npgsql #2
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
Conversation
|
Actually I was about to setup npgsql for other reasons on a local build machine here. Is this the only thing needed to get a green build? Why converting to a byte? Any particular reason an int cast isn't enough? |
|
EnumUserType in NH Core seems to do a simple |
|
I made it a byte for maximum expected compatibility. The column type for the user type is DbType.Byte, which is an unsigned byte, so I figured the most likely thing to work on all providers is sending the same unsigned byte in. |
|
We are struggling with a strange TypeLoadException (declaration cannot be final) that is unrelated to this particular change (is related to NHE-163), but after that it appears we might end up with green tests for Npgsql. I will post another comment once that is confirmed. |
|
In case somebody stumbles upon this thread, the TypeLoadException looks like a bug in the NHibernate ProxyFactory stuff. The name and/or MethodAttributes of the methods implementing the interfaces explicitly need to be set differently to not conflict with base implementations. We will submit a PR to NHibernate for this and replace the NHibernate.Envers proxy with something custom in the interim. I have yet to confirm that the parameter fix is all that is needed for Npgsql. We are working on replacing the proxy and will comment back. |
|
With this Convert.ToByte fix and the unrelated fix to NHibernate for the TypeLoadException, everything is green for us. A speedy release of this would naturally be appreciated. :) |
|
@patearl could you please make a PR to NHibernate for this "unrelated fix"? We might be able to include it into the next release, which is already overdue. |
|
I have setup a local env for Npgsql now. Will merge your fix, thank you!
|
|
We only ran our local suite of tests; sorry for the confusion. The NH proxy bug manifests itself as a TypeLoadException mentioning a final declaration. Is that what you are seeing? We don't use transaction enlistment or distributed transactions, so I wouldn't have any immediate insight into that area. |
|
The tests that are still red on postgres were not related to nor "TypeLoadException" or this fix. Do you want me to do a release now or do you have to wait for the NH fix mentioned above anyhow (if so, I'll wait with a release until next NH Core release is made)? |
This failure was mentioned by somebody else on the mailing list. Our internal tests prove that this trivial change eliminates the exception.