-
Notifications
You must be signed in to change notification settings - Fork 54
Broken if NHibernate version is greater than 5.1 #104
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
Comments
Hi @EnemyArea thanks for reporting this. I've confirmed that this issue occurs when running the NHibernate.Spatial test cases too. It appears to be due to changes made in nhibernate/nhibernate-core#1703. In particular, the following changes to the Those changes mean that the specified Dialect is no longer initialized when configuring the mappings, which means that @hazzik any thoughts on this? The remarks on the As a workaround for now, I'll release a new 5.1.1 version of NHibernate.Spatial that limits the NHibernate version dependency to 5.1.x. |
Sorry, I've missed the notification. |
@fredericDelaporte can you take a look? I tried to make |
I will try to have a look tomorrow. My current understanding of this is that NHibernate somewhat lacks a feature required by Spatial, and that a hack was used by Spatial to work around this lack. But this hack is broken with latest NHibernate. If someone could PR a test case of that hack on NHibernate side, it would surely help investigating what can/should be done. Preferably Spatial contributors should also submit a new feature issue on NHibernate side for asking for the proper feature which would allow avoiding hacking around its lack. (Unless there is already such a pending issue, but then please point us to it.) |
This by the way allows NHibernate.Spatial dialect hack to work again, see nhibernate/NHibernate.Spatial#104
I propose nhibernate/nhibernate-core#2011 for allowing restoring the Spatial hack. Still I think Spatial contributors should ask or contribute some better way of handling this situation. It could be something like adding an This would allow the |
First of all, thank you both for looking into this - much appreciated! I was away for the weekend so apologies for not replying sooner. I should have some time today to test whether the PR fixes the issue.
I agree - I'm not too familiar with the current implementation in NHibernate.Spatial (it was before my time), but judging by the comments in the source code, it definitely seems like it was meant to be a temporary "kludge". I will try to find some time to implement something along the lines of what you propose and see if it works. |
Thank you guys! Great job! |
Great job @peetw, thank you very much! I did a smoke test with a few of my current projects, and everything seems to run fine so far :) |
Hey guys,
there seems to be some changes, that prevents the dialect to be createt. If you test it with Nhibernate 5.1.2 (latest 5.1) it works well. But under Nhibernate 5.2 and greater, you got an error: ": A GeometryType column has been declared, but there is no spatial dialect configured"
The text was updated successfully, but these errors were encountered: