Just stumbled upon this db orm for c++ that uses the gcc frontend to rewrite c++ code to make classes suitable for database access. http://www.codesynthesis.com/products/odb/ They are using pragmas to accomplish this. I guess an equally good implementation in D would use custom attributes for this once (if) they are supported. /Jonas