If we want the core to be backend independent, we cannot assume ID's are of the long datatype. The client should probably get Object instead of long.