Skip to content

fix: query fails for subclassed Parse object in Parse relation #697

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

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 6 additions & 23 deletions .github/ISSUE_TEMPLATE/---1-report-an-issue.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,15 @@ assignees: ''

### New Issue Checklist
<!--
Please check all of the following boxes [x] before submitting your issue.
Check every following box [x] before submitting your issue.
Click the "Preview" tab for better readability.
Thanks for contributing to the Parse Flutter SDK!
Thanks for contributing to Parse Platform!
-->

- [ ] I am not disclosing a [vulnerability](https://github.com/parse-community/Parse-SDK-Flutter/security/policy).
- [ ] I am not just asking a [question](https://github.com/parse-community/.github/blob/main/SUPPORT.md).
- [ ] I have searched through [existing issues](https://github.com/parse-community/Parse-SDK-Flutter/issues?q=is%3Aissue).
- [ ] I can reproduce the issue with the [latest version of the Parse Flutter SDK](https://github.com/parse-community/Parse-SDK-Flutter/releases). <!-- We don't investigate issues for outdated releases. -->
- [ ] I can reproduce the issue with the [latest version of Parse Server](https://github.com/parse-community/parse-server/releases).
- [ ] I can reproduce the issue with the latest version of [Parse Server](https://github.com/parse-community/parse-server/releases) and the [Parse Flutter SDK](https://github.com/parse-community/Parse-SDK-Flutter/releases). <!-- We don't investigate issues for outdated releases. -->

### Issue Description
<!-- What is the specific issue? -->
Expand All @@ -27,36 +26,20 @@ assignees: ''
<!-- How can someone else reproduce the issue? -->

### Actual Outcome
<!-- What outcome, for example query result, did you get? -->
<!-- What outcome did you get? -->

### Expected Outcome
<!-- What outcome, for example query result, did you expect? -->
<!-- What outcome did you expect? -->

### Pull Request
<!--
Check one of the following boxes [x] if you added a PR and add the link.
If you need any guidance please do ask.
-->

- [ ] 🤩 I submitted a PR with a fix.

### Environment
### Environment
<!-- Be specific with versions, don't use "latest" or semver ranges like "~x.y.z" or "^x.y.z". -->

Parse Flutter SDK
- SDK version: `FILL_THIS_OUT`
- Operating system: `FILL_THIS_OUT`
- Operating system version: `FILL_THIS_OUT`

Server
- Parse Server version: `FILL_THIS_OUT`
- Operating system: `FILL_THIS_OUT`
- Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc): `FILL_THIS_OUT`

Database
- System (MongoDB or Postgres): `FILL_THIS_OUT`
- Database version: `FILL_THIS_OUT`
- Local or remote host (MongoDB Atlas, mLab, AWS, Azure, Google Cloud, etc): `FILL_THIS_OUT`

### Logs
<!-- Include relevant logs here. -->
7 changes: 2 additions & 5 deletions .github/ISSUE_TEMPLATE/---2-feature-request.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ assignees: ''

### New Feature / Enhancement Checklist
<!--
Check all of the following boxes [x] before submitting your issue.
Check every following box [x] before submitting your issue.
Click the "Preview" tab for better readability.
Thanks for contributing to the Parse Android SDK!
Thanks for contributing to Parse Platform!
-->

- [ ] I am not disclosing a [vulnerability](https://github.com/parse-community/Parse-SDK-Flutter/security/policy).
Expand All @@ -29,6 +29,3 @@ assignees: ''

### Alternatives / Workarounds
<!-- Which alternatives or workarounds exist currently? -->

### 3rd Party References
<!-- Have you seen a similar functionality provided somewhere else? -->
27 changes: 27 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
### New Pull Request Checklist
<!--
Please check the following boxes [x] before submitting your issue.
Click the "Preview" tab for better readability.
Thanks for contributing to Parse Server!
-->

- [ ] I am not disclosing a [vulnerability](https://github.com/parse-community/Parse-SDK-Flutter/security/policy).
- [ ] I am creating this PR in reference to an [issue](https://github.com/parse-community/Parse-SDK-Flutter/issues?q=is%3Aissue).

### Issue Description
<!-- Add a brief description of the issue this PR solves. -->

Related issue: #`FILL_THIS_OUT`

### Approach
<!-- Add a description of the approach in this PR. -->

### TODOs before merging
<!--
Add TODOs that need to be completed before merging this PR.
Delete TODOs that do not apply to this PR.
-->

- [ ] Add tests
- [ ] Add changes to documentation (guides, repository pages, in-code descriptions)
- [ ] A changelog entry
38 changes: 22 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,30 @@
<p align="center">
<img alt="Parse Logo" src="https://parseplatform.org/img/logo.svg" width="500">
</a>
</p>
# Parse SDK for Flutter / Dart

---
[![Build Status](https://app.travis-ci.com/parse-community/Parse-SDK-Flutter.svg?branch=master)](https://app.travis-ci.com/parse-community/Parse-SDK-Flutter)

[![Backers on Open Collective](https://opencollective.com/parse-server/backers/badge.svg)][open-collective-link]
[![Sponsors on Open Collective](https://opencollective.com/parse-server/sponsors/badge.svg)][open-collective-link]
[![License](https://img.shields.io/badge/license-BSD-lightgrey.svg)](https://github.com/parse-community/Parse-SDK-Android/blob/master/LICENSE)
[![Forum](https://img.shields.io/discourse/https/community.parseplatform.org/topics.svg)](https://community.parseplatform.org/c/parse-server)
[![Twitter Follow](https://img.shields.io/twitter/follow/ParsePlatform.svg?label=Follow%20us%20on%20Twitter&style=social)](https://twitter.com/intent/follow?screen_name=ParsePlatform)

This repository contains packages that allow communication with a Parse Server,
(https://parseplatform.org) either hosted on your own server or another,
like (http://Back4App.com).
---

This is a work in progress and we are consistently updating it. Please let us know if you think anything needs changing/adding, and more than ever, please do join in on this project. (Even if it is just to improve our documentation)
A library that gives you access to the powerful Parse Server backend from your Flutter app. For more information about Parse and its features, see [the website](https://parseplatform.org/), [getting started][guide], and [blog](https://blog.parseplatform.org/).

## Packages

These are the available packages in this repository.
These packages are available in this repository:

| Package | Pub | Description |
|------------------------------------------------|------------------------------------------------------------------------------------------|-----------------|
| [parse_server_sdk](./packages/dart) | [![pub package](https://img.shields.io/pub/v/parse_server_sdk.svg)](pub-dart) | Dart package |
| [parse_server_sdk_flutter](./packages/flutter) | [![pub package](https://img.shields.io/pub/v/parse_server_sdk_flutter.svg)](pub-flutter) | Flutter package |

| Plugin | Pub | explanation|
|--------|-----|------------|
| [parse_server_sdk](./packages/dart) | [![pub package](https://img.shields.io/pub/v/parse_server_sdk.svg)](https://pub.dev/packages/parse_server_sdk) | a dart package that lets you communicate with the parse server |
| [parse_server_sdk_flutter](./packages/flutter) | [![pub package](https://img.shields.io/pub/v/parse_server_sdk_flutter.svg)](https://pub.dev/packages/parse_server_sdk_flutter) | a flutter package that lets you communicate with the parse server |
## Author
This project was originally authored by Phill Wiggins and since transferred to Parse Platform.

### Author:-
This project was authored by Phill Wiggins. You can contact me at [email protected]
[guide]: http://docs.parseplatform.org/android/guide/
[open-collective-link]: https://opencollective.com/parse-server
[pub-dart]: https://pub.dev/packages/parse_server_sdk
[pub-flutter]: https://pub.dev/packages/parse_server_sdk_flutter
2 changes: 1 addition & 1 deletion packages/dart/lib/src/objects/parse_relation.dart
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class ParseRelation<T extends ParseObject> {
Set<T>? _knownObjects = Set<T>();

QueryBuilder getQuery() {
return QueryBuilder(ParseObject(_targetClass!))
return QueryBuilder(ParseCoreData.instance.createObject(_targetClass!))
..whereRelatedTo(_key, _parent!.parseClassName, _parentObjectId);
}

Expand Down