added support for primary key in flows