That is the other problem. Every database is a mash of semi intentional subtle incompatibility with the standard and a host of non-standard features. When an ORM comes along many try to expose the non-standard features that make sense in some way but end up needing a custom solution for each DB (see how you do an auto sequence ID for an entity bean between Postgres and MSSQL).
So you have a semi portable layer interfacing with a semi portable environment.
So you have a semi portable layer interfacing with a semi portable environment.