Check if there is a resource map for an object before saving its id in
the Package model