make cast use Number for rowid and pass schema instead of definition
definition is null for some reason