So long I was working on this topic alone, but I thought this evening that many MPS users already did something alike. So, which approach do you use in order for your application to work with rdbms?
My case is - java application that utilizes the power of MPS and DSL, allowing user to customize UI, business processes and other customizable stuff. UI says what data it needs.
I think in this case it is possible to find out statically what data will be queried, stored and updated in database. In other words, generator will produce exact query, ie:
join document a2
on a2.id = a1.document
a1.id = ?
So I don't need any ORM tool when everything is defined statically.