Update AR class

Add create function.
Rename getPrimaryKey to getId