You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When saving array of pointers each pointer saved along with the attributes of the referenced object
i noticed that there was already an issue open for this and then a PR applied and fix the issue
but it turns out that somehow its still exist #6049
Steps to reproduce
this code used to save Parent Object which have list of PostCategory as Array of Pointers
// Create Parent Object with postCategories initialized as empty list and save it in the database
val ceParent = Parent().apply {
this.arName = "قسم هندسة الاتصالات"
this.enName = "CE Department"
this.postCategories = arrayListOf()
this.channelName = "ce"
}
ceParent.save()
// Create category object and link it to the previous Parent and save it in the database
val ceGeneralAnnouncementCategory = PostCategory().apply {
this.arName = ""
this.enName = "General Announcement"
this.channelName = "ceGenAnnounce"
this.parent = ceParent
}
val ceGradesCategory = PostCategory().apply {
this.arName = ""
this.enName = "Exams Grades"
this.channelName = "ceGrades"
this.parent = ceParent
}
ceGeneralAnnouncementCategory.save()
ceGradesCategory.save()
// Get the Parent object and then update it with a list of the categories that you already saved
ceParent.postCategories = arrayListOf(
ceGeneralAnnouncementCategory,
ceGradesCategory
)
ceParent.save()
Expected Results
saving array of pointers must be saved in this form :
this behaviour doesn't affect querying the Parent Object (Who has the array of pointers field)
i still able to get the array of pointers objects with include
val query = ParseQuery.getQuery(Parent::class.java)
query.whereEqualTo("objectId","uYn8FF1Qcd")
query.include(Parent::postCategories.name)
val result = query.first.postCategories
result?.forEach{
Log.d("PARENT : ","${it.channelName}")
}
UPDATE
maybe its problem with parse dashboard. i cleared all the records in the Parent Class and made the insertion step again and the result was as expected. but when i have made another insertion the object who saved correctly and the newly inserted object has the Array of pointers field changed to the whole object saved along with each pointer
The text was updated successfully, but these errors were encountered:
Final Update :
everything is working fine, you can query the array of pointers always even if it shown in the dashboard as whole object saved or only pointer related fields
the problem is with parse dashboard and the most interesting fact that when you insert your data first it will be shown as whole object is saved but if you checked it afterward (closed the browser tab and reopen) you will see the normal behaviour appears
i will close this because the (buggy) behaviour seems to be not causing any problems (as i already said you can always query the data and get correct results)
Uh oh!
There was an error while loading. Please reload this page.
Issue Description
When saving array of pointers each pointer saved along with the attributes of the referenced object
i noticed that there was already an issue open for this and then a PR applied and fix the issue
but it turns out that somehow its still exist
#6049
Steps to reproduce
this code used to save Parent Object which have list of PostCategory as Array of Pointers
Expected Results
saving array of pointers must be saved in this form :
Actual Outcome
but when looking to the dashboard it looks like this
Environment Setup
Note
this behaviour doesn't affect querying the Parent Object (Who has the array of pointers field)
i still able to get the array of pointers objects with
include
UPDATE
maybe its problem with parse dashboard. i cleared all the records in the Parent Class and made the insertion step again and the result was as expected. but when i have made another insertion the object who saved correctly and the newly inserted object has the Array of pointers field changed to the whole object saved along with each pointer
The text was updated successfully, but these errors were encountered: