ToSql and sequence support