General updates

I've done a few general changes to the code in the way that relationships are working.  I fixed a bug where it was treating both types of one-to-many relationships (left to right and right to left) as the same, and so was printing out too many stings like the following in the table classes:

    String WHERE_TYPE_ID_EQUALS = TYPE_ID + "=?";

I've also added in some useful functions in the generated model classes which I think will be useful:

A constructor which takes a child class (T extends CurrentObject), so when extending a generated class, there is code to take some of the pain away from converting between child and parent classes.

I've added a method called getXById which will query the DB for X against the row id and return a fully formed object.

I've added methods for both types of DB relationship which will return objects based on the type of relationship.

I wasn't too sure about naming for some of the DB relationship stuff, so would be awesome if you could have a look and let me know what you think and what changes you would like to see.