Add custom primary key support