Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit 6ca2ac0

Browse files
committed
more tweaks
1 parent 0ffa092 commit 6ca2ac0

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

README.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2180,13 +2180,30 @@ And with access to raw sql when you need it - the database is your oyster :)
21802180

21812181
# Limitations
21822182

2183+
### Single Primary Key
2184+
21832185
For simplicity, and to be able to have the same POCO class persisted in db4o, memcached, redis or on the filesystem (i.e. providers included in ServiceStack), each model must have a single primary key, by convention OrmLite expects it
21842186
to be `Id` although you use `[Alias("DbFieldName")]` attribute it map it to a column with a different name or use
21852187
the `[PrimaryKey]` attribute to tell OrmLite to use a different property for the primary key.
21862188

21872189
You can still `SELECT` from these tables, you will just be unable to make use of APIs that rely on it, e.g.
21882190
`Update` or `Delete` where the filter is implied (i.e. not specified), all the APIs that end with `ById`, etc.
21892191

2192+
### Optimize LIKE Searches
2193+
2194+
One of the primary goals of OrmLite is to expose and RDBMS agnostic Typed API Surface which will allow you
2195+
to easily switch databases, or access multiple databases at the same time with the same behavior.
2196+
2197+
One instance where this can have an impact is needing to use `UPPER()` in **LIKE** searches to enable
2198+
case-insensitive **LIKE** queries across all RDBMS. The drawback of this is that LIKE Queries are not able
2199+
to use any existing RDBMS indexes. We can disable this feature and return to the default RDBMS behavior with:
2200+
2201+
```csharp
2202+
OrmLiteConfig.StripUpperInLike = true;
2203+
```
2204+
2205+
Allowing all **LIKE** Searches in OrmLite or AutoQuery to use any available RDBMS Index.
2206+
21902207
## Oracle Provider Notes
21912208

21922209
The Oracle provider requires an installation of Oracle's ODP.NET. It has been tested with Oracle 11g but should work with 10g and perhaps even older versions. It has not been tested with Oracle 12c and does not support any new 12c features such as AutoIncrement keys. It also does not support the new Oracle fully-managed client.
@@ -2210,7 +2227,6 @@ The previous version of ServiceStack.OrmLite.Oracle used System.Data.OracleClien
22102227

22112228
DateTimeOffset fields and, in locales that use a comma to separate the fractional part of a floating point number, some aspects of using floating point numbers, do not work with System.Data.OracleClient.
22122229

2213-
22142230
# Community Resources
22152231

22162232
- [OrmLite and Redis: New alternatives for handling db communication](http://www.abtosoftware.com/blog/servicestack-ormlite-and-redis-new-alternatives-for-handling-db-communication) by [@abtosoftware](https://twitter.com/abtosoftware)
@@ -2221,7 +2237,6 @@ DateTimeOffset fields and, in locales that use a comma to separate the fractiona
22212237
- [OrmLite Blobbing done with NHibernate and Serialized JSON](http://www.philliphaydon.com/2012/03/ormlite-blobbing-done-with-nhibernate-and-serialized-json/) by [@philliphaydon](https://twitter.com/philliphaydon)
22222238
- [Creating An ASP.NET MVC Blog With ServiceStack.OrmLite](http://www.eggheadcafe.com/tutorials/asp-net/285cbe96-9922-406a-b193-3a0b40e31c40/creating-an-aspnet-mvc-blog-with-servicestackormlite.aspx) by [@peterbromberg](https://twitter.com/peterbromberg)
22232239

2224-
22252240
## Other notable Micro ORMs for .NET
22262241
Many performance problems can be mitigated and a lot of use-cases can be simplified without the use of a heavyweight ORM, and their config, mappings and infrastructure.
22272242
As [performance is the most important feature](https://github.com/mythz/ScalingDotNET) we can recommend the following list, each with their own unique special blend of features.

0 commit comments

Comments
 (0)