Ted Neward’s The Vietnam of Computer Science enumerates in depth all the hard problems in Object-Relational Mapping. The state of the art has changed enough since Neward published the article in 2006 — SQLAlchemy tackles all, and solves many, of these problems now.