Fix a bug when the table name differs from the entity name
cut 0.1.6