-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parse back from EntityKey.toString() to get FK #63
Comments
No, there is not. |
You can also look at the 'keyProperties' of the EntityType and then extract them from the entity yourself directly. See http://breeze.github.io/doc-js/api-docs/classes/entitytype.html#keyproperties |
Thank you. I use the human readable version of id: entityKey.toString(),
get parentId() {
...
return parentEntityKey.toString();
},
set parentId(parentEntityKey) {
...
// change value of FK property
this.entity[propertyName] = parentEntityKey.split("-")[1];
} As I can see there is specific mechanism with globally defined
|
Hi,
I didnt find native way how to parse back a value returned from
EntityKey.toString()
(doc). I can see the returned string value is concatenated as follows:[EntityType.name, foreignKeyValue].join('-')
. Is there any native, correct way how to get the FK(s)? Of course, I can doentityKeyString.split("-")[1]
but feels dirty. Am I missing something? Thanks.The text was updated successfully, but these errors were encountered: