Fixed static method chaing in database