Useful getId method on models