I've added the SQL code generator. Getting difficulty generating the same code from your class diagram as you have in your example files. The references bit isn't there. Currently the sqlwriter only seems to generate code for composition references but your diagram only has a plain association. Thanks for the feature. Jonathan Riddell