This usually comes with a hit to performance though. Raw queries are generally quite a bit faster. So if you dont plan on changing databases on a project, it might be beneficial to skip the ORM where possible.
The ORM also doesnt help you with migrating the records from one database type to another. So if you already have established records that is a separate issue.
First time it was a home-grown layer on top of the DBMS (MS SQL Server at the time). After an investment we've got a requirement to switch to Oracle. We anticipated that (or something like it) when designing the system, so it went smoothly.
Second time it was using MySQL from Sun workstations, with the idea of eventually switching to Oracle. That's why "almost" - we knew about the requirement in advance, so we didn't create hard dependencies on MySQL. Yet we didn't constantly test our system vs. Oracle either.
Admittedly the latest of these happened more than 10 years ago.
Once you get into production it's a different story. A good ORM makes it easy to swap to a different DB without need for code changes. What it does not help with is the much bigger problem of how to migrate the data, indicies, backups, replication, etc. that you'd have in place for a production database.
Production runs on PostgreSQL and the offline version uses SQLite. Other than a very thin shim layer around database migrations all the code is the same and uses NHibernate
The unit tests run 50/50 against PostgreSQL instances and SQLite
Occasionally I have to stop myself from trying some cool new PostgreSQL specific feature. But generally everything 'just works'