Our current code-generation tool has many shortcomings and due to its hard to test nature also many (known and unknown) bugs, as well as high maintenance.
Since people are overusing this tool and I am sort of annoyed by how much time goes into this we should rewrite this in a two-step procedure:
1. Move code into Common so we can share it between ORM, Mongo and CouchDB.
2. Use PDepend to read an entities source file (it generates an AST) and modify the AST with the required changes.
This gives us the advantage of having to maintaining less code for this stuff.