updated create method to return T

I also ensured that begin transaction, persist, flush and commit transaction are called as well as returning T