Composite Primary Key support for IsNew<T>()

adapted from http://stackoverflow.com/a/14371744/17981