Unit of work + document database on Postgresql