What has changed with NHibernate and database providers in 1.5?

Topics: Customizing Orchard, Installing Orchard, Troubleshooting, Writing modules
Jul 20, 2012 at 7:59 AM

I trying to implement MySQL as a database provider in 1.5 and its not works like in 1.4.2 and older versions.

Because i getting a error says (translated from swedish to english): "Keyword is not supported: port".

I have exactly the same code that i have implemented in older versions so something has been changed i would be happy if someone can help me what i need to do.

I think it has something to do with database connection string validation or maybe the error become becouse its can not find my MySql database provider and then trying sql server as provider and sql server not has "port" in the connection string.

Please help me and i help the community to get MySQL as database provider.

Coordinator
Jul 20, 2012 at 6:15 PM

We have decided that MySQL would be part of the Core in 1.6. By the way you should work with the NH3 branch if you still want to do it, as it now uses NHibernate 3.3 which will also ship in 1.6. It's in the roadmap on the documentation website.

Jul 20, 2012 at 7:06 PM

nice, so if i implement MySQL as a database provider in a fork of NH3 branch you maybe using it in 1.6?

Or do you going to change stuff to get it easier to add database providers so i should not do it now? 

Coordinator
Jul 20, 2012 at 7:09 PM

I don't know right now. It will depend on breaking changes. I have to take a look at the module first, as I assume it was adding some extensibility point for other providers. But it would not be an issue to have it without extension points right now.

Jul 21, 2012 at 9:04 AM

I have implemented the MySQL database provider the way i have done last versions, i can guess that you whant to do some changes maybe but i think it is a good implementation.

Only one thing i have not fixed and dont really know how to do is the "[SqlDatabaseConnectionString]" in SetupViewModel.cs that validation only looks like it works for SQL server connections so i have comment it out.

I can not test the code becouse the NH3 branch not works for me, i have writen a issue here: http://orchard.codeplex.com/workitem/18851

My changes i have done in a fork and here is the commit http://orchard.codeplex.com/SourceControl/network/forks/RickardP/orchardmysql/changeset/4fec62098194

After i can test the code i going to put a pull request but if you whant to review my implementation and maybe give me some advice to let me do the implementation another way that i dont have you are welcome.

Jul 24, 2012 at 8:10 AM

I have after sebastienros mini profiler fix got the NH3 branch to work with my implementation of MySQL.

I have put a pull request for review and i am open for discussion about the implementation.

Pull request url: http://orchard.codeplex.com/SourceControl/network/forks/RickardP/orchardmysql/contribution/3140