Returning ids instead of objects

This will avoid the problem of ciclic imports
the study ids