class generator now can generate function to get object belonget to class by id