add custom primary key support