Skip to content

Allow implementations of ParseObjects to set their own className #422

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
3 tasks done
atonylai opened this issue Sep 30, 2022 · 4 comments
Closed
3 tasks done

Allow implementations of ParseObjects to set their own className #422

atonylai opened this issue Sep 30, 2022 · 4 comments
Labels
state:duplicate Duplicate of already reported issue type:question Support or code-level question

Comments

@atonylai
Copy link

atonylai commented Sep 30, 2022

Current Limitation

struct extensions of ParseObject seem to force their name as the classTitle

struct GameScore: ParseObject { ... }

We use Stripe as another library - Stripe has a class called Event. One of the tables in our database that is heavily populated is already called Event.

Feature / Enhancement Description

Allow extensions of ParseObject to function more like PFObject. While it's a lot of work for us to have to add in

struct SomeDatabaseTableName: ParseObject { ... }

this is not impossible, albeit just a lot of boilerplate code.

Example Use Case

struct RandomClassName: ParseObject { 

   var className = "ActualDatabaseClassName"

 }

Alternatives / Workarounds

We could migrate the entire table into a new one and update all of the code to point to a new table, but that would still leave us at the mercy of any of our dependencies adding in a new class or struct that conflicts with ours.

3rd Party References

The original obj-c Parse SDK

@parse-github-assistant
Copy link

parse-github-assistant bot commented Sep 30, 2022

Thanks for opening this issue!

  • ❌ Please edit your post and use the provided template when creating a new issue. This helps everyone to understand your post better and asks for essential information to quicker review the issue.

@mtrezza
Copy link
Member

mtrezza commented Oct 1, 2022

Is this issue supposed for the Parse Swift SDK?

@atonylai
Copy link
Author

atonylai commented Oct 1, 2022

My mistake, had too many tabs open and filed on the wrong one by accident!

@atonylai atonylai closed this as completed Oct 1, 2022
@mtrezza mtrezza transferred this issue from parse-community/Parse-SDK-iOS-OSX Oct 1, 2022
@mtrezza
Copy link
Member

mtrezza commented Oct 1, 2022

Duplicate of #421

@mtrezza mtrezza marked this as a duplicate of #421 Oct 1, 2022
@mtrezza mtrezza added type:feature New feature or improvement of existing feature state:duplicate Duplicate of already reported issue type:question Support or code-level question and removed type:feature New feature or improvement of existing feature labels Oct 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state:duplicate Duplicate of already reported issue type:question Support or code-level question
Projects
None yet
Development

No branches or pull requests

2 participants