Breeze - Can't Create Entity when PK is an autogenerated ID

breeze entity-framework-6 knockout.js oracle single-page-application

Popular Answer

I figured it out on my own, and it's now functional. The following code will set the AutoGeneratedKeyType property:

var entityType = manager.metadataStore.getEntityType("ESCC_TRANSACTIONS");
entityType.autoGeneratedKeyType = "Identity";

Or try this:

var entityType = manager.metadataStore.getEntityType("ESCC_TRANSACTIONS");
entityType.autoGeneratedKeyType = breeze.AutoGeneratedKeyType.Identity;

And despite what Breeze says about AutoGeneratedKeyType here: http://breeze.github.io/doc-js/api-docs/classes/AutoGeneratedKeyType.html, the "a" in Auto is a tiny "a" rather than a capital one.

1
4/23/2019 2:51:09 PM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow