Bruce Cowan - 292 - Mar 20, 2014

I need to have Oracle support using ODP.NET, not Microsoft’s provider (which is deprecated). I’m in the middle of making it, starting from the existing Oracle provider. I’m inclined to make a separate OrmLite provider and leave the existing one as it is, mostly because I will not be maintaining compatibility (see below). But, given that the existing one is unsupported, maybe it would be better to simply modify it.

The reason I won’t be maintaining compatibility is that I need a single set of my source code to work on Oracle, SQL Server, and SQLite, with the database chosen at run time. The existing Oracle provider supports Oracle sequences for populating key fields, but it does not work if you put an AutoIncrement attribute on your key field, it uses a Sequence attribute. I need the AutoIncrement attribute working, but the Sequence attribute can still be used if it is necessary to specify the sequence name as long as it doesn’t mess up the other providers - I haven’t tested that but I expect it doesn’t.
The provider won’t initially support Oracle 12C identity or boolean columns, and may have other 12C issues, but that will come fairly soon, because we’ll be adding 12C to the list of supported Oracle databases in our product.

Any preference, Demis (or other ServiceStack folks)?

Hi Bruce, Since it will likely cause breaking changes, I would start as a new provider first and once it’s ready for public use wait till we hear feedback from other Oracle OrmLite users like +Doug Schmidt. If we can get consensus that the new provider is the way to go then we could make it the official provider. 

Doug Schmidt:

Heh. Bruce and I work together, so my feedback is going to be “merge it!” :wink:

lol, cool :slight_smile:
__________

Bruce Cowan:

I’m almost done with the much changed Oracle provider - a couple of bugs left to swat. At this point the AutoIncrement attribute works completely compatibly with the implementation in the old provider and the way I want it to. It turns out that it always did apart from some small bugs. It runs using either the ODP.NET or Microsoft’s provider.

I changed the default storage for Guids to raw(16) which is what is recommended, but you can instantiate the provider with an option to use varchar2 storage, but Guids didn’t work before. I also changed all strings to varchar2 from varchar, and bool to number(1) again because that is what is recommended. I changed TimeSpan to same as long to make it work. There are many changes to make things work, and lots of unit tests (copied from the standard set of OrmLite tests) to make sure it does.

Thus, although the provider is not quite backward compatible, all the breaking changes were done to things that didn’t work. So, I’m inclined to want to just merge it rather than put it beside the old one.

Yep, I’m happy for replacing the existing provider as it seems you’ve already fixed a few major issues and no maintainers are left to support the existing provider (which is currently unsupported). 

As for Guids, you should run it through this test to see if it handles the different scenarios: https://github.com/ServiceStack/ServiceStack.OrmLite/blob/8bd87a7098bcffce0…215cf7eb2/tests/ServiceStack.OrmLite.Tests/OrmLiteCreateTableTests.cs#L161

Bruce Cowan:

All the tests in that file run fine, after I change the comparison from VARCHAR to VARCHAR2. I’m also in the process of verifying that I fixed https://github.com/ServiceStack/Issues/issues/26 and if it turns out I didn’t, I will.

+Bruce Cowan that would be excellent, thx! it would be nice to be able to close it as I feared it would’ve remained open forever :slight_smile: