There are lots of things you can do, but when it's the ORM which does it you have limited control, and that's the way it should to be (me as application-developer having to worry less about such details).
In that case it's your ORM that needs fixing, not the database.
If you can't see the forest for the trees,
Cut the trees and you'll see there is no forest.