As of April 12th, you must go to Progress SupportLink to create new support cases or to access existing cases. Please, bookmark the SupportLink URL and use the new portal to contact the support team.
How to delete a referenced object from specific entity ?
W
Wood Wayfarer
started a topic
about 7 years ago
Hi could you please help me? I have collection Libraries and Books. Libraries object has a set of Books objects. For example Library1 has three books (Book1,Book2,Book3), how can I delete referenced object Book1 from Library1?
Best Regards
Alex
Best Answer
W
Wani
said
about 7 years ago
Hi,
Once you have fetched Library1 object, you can just edit the property containing the array of books and remove the Book1 from there and then, update Library1 object. That will remove reference of Book1 from Library1.
FYI, Book1 would still exist in Books collection. If you want to delete Book1 from Books collection also, you will have to execute a delete query on Books collection with id value taken from Library1 object.
Once you have fetched Library1 object, you can just edit the property containing the array of books and remove the Book1 from there and then, update Library1 object. That will remove reference of Book1 from Library1.
FYI, Book1 would still exist in Books collection. If you want to delete Book1 from Books collection also, you will have to execute a delete query on Books collection with id value taken from Library1 object.
Wood Wayfarer
Hi could you please help me? I have collection Libraries and Books. Libraries object has a set of Books objects. For example Library1 has three books (Book1,Book2,Book3), how can I delete referenced object Book1 from Library1?
Best Regards
Alex
Hi,
Once you have fetched Library1 object, you can just edit the property containing the array of books and remove the Book1 from there and then, update Library1 object. That will remove reference of Book1 from Library1.
FYI, Book1 would still exist in Books collection. If you want to delete Book1 from Books collection also, you will have to execute a delete query on Books collection with id value taken from Library1 object.
Does that answer your question?
Regards,
Wani
Kinvey Support
- Oldest First
- Popular
- Newest First
Sorted by PopularWani
Hi,
Once you have fetched Library1 object, you can just edit the property containing the array of books and remove the Book1 from there and then, update Library1 object. That will remove reference of Book1 from Library1.
FYI, Book1 would still exist in Books collection. If you want to delete Book1 from Books collection also, you will have to execute a delete query on Books collection with id value taken from Library1 object.
Does that answer your question?
Regards,
Wani
Kinvey Support
1 person likes this
Wood Wayfarer
Yes.Thank you
-
Why do I get "Undefined symbols" errors when building with KinveyKit?
-
How do I register push tokens?
-
When using social login, to perform a log-out, do I need to log out of the social network, Kinvey, o
-
How can I assign additional properties to users?
-
Does KinveyKit support 64-bit ARM devices, such as iPhone 5s?
-
Authorization Token Invalid or Expired
-
BOOL and how it is stored in the database.
-
Offline saving throwing errors
-
Custom endpoint not able to form request object
-
Security through business logic
See all 437 topics