When using the id in queries, we should consider only the root mappings.
Only the root mapper should be able to find by id. Otherwise is because the entity is a associated type.
Testing the complex schema.
Merge pull request #171 from pedroigor/master

Some changes to support the complex schema tests.