(GitHub #10) Added tests for flatten.

 * Test protected fields.
 * Test private fields with _.
 * Test ID shortcut, for a class with a primary key.