I have now read the tutorial. I do like the approach and information in general. I would like you to consider trying a few things and then update the tutorial as approrpriate.
1) I have also changed the class name algorithm recently which is in CVS. This improves the defaults. Its still not perfect but it can be further improved. In addition, tables names, Singular and Plural, can be set using the table tag. I would suggest trying it out see if this approach to table naming can be improved. Eg,
Code:
<middlegen
[cut attributes]
>
.....
<table name="EMPLOYEES" singular="employee" plural="employees" />
</middlegen>
2) Many-to-many (and in this case) the better option is to use Middlegen's ability to create (and display in the GUI) Many-to-many relationships directly. You set this up in the Ant script similar to above.
Code:
<middlegen
[cut attributes]
>
.....
<many2many>
<tablea generate="true" name="EMPLOYEES" />
<jointable name="EMPLOYEES_DEPARTMENTS" generate="false" />
<tableb generate="true" name="DEPARTMENTS" />
</many2many>
</middlegen>
You can combine these methods to get the result you were trying to illustrate.
Thanks for your efforts, I have started a detailed tutorial but getting the time to finsihed has been a challenge. Glad you have (started) the process. Hope this information helps you and others that are reading this post (and your tutorial [possibly updated]).
-- David.