Fixed a bug in fetch_by_id when inheritance is :leaf
Merge pull request #46 from mcamou/#40

Fixed a bug in fetch_by_id when inheritance is :leaf