Changing $name to $id into database layer examples

Currently the database layer examples are inconsistent, using $id in entity and sometimes $name, sometimes $id in example controllers.
I think than only $id is valid to all cases.