Skip to content
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

Assign the correct public name value while creating schema #697

Closed
Tracked by #702
sync-by-unito bot opened this issue Jun 28, 2022 · 1 comment · Fixed by #1078
Closed
Tracked by #702

Assign the correct public name value while creating schema #697

sync-by-unito bot opened this issue Jun 28, 2022 · 1 comment · Fixed by #1078
Assignees

Comments

@sync-by-unito
Copy link

sync-by-unito bot commented Jun 28, 2022

realm_core.dart

SchemaHandle _createSchema(Iterable<SchemaObject> schema) {
......
    //TODO: Assign the correct public name value

propInfo.public_name = "".toUtf8Ptr(arena);
@nirinchev
Copy link
Member

This is a problem for @mapto as it currently generates an a SchemaProperty like:

SchemaProperty('primitive_property', RealmPropertyType.string,
          mapTo: 'primitive_property')

Note that both name and mapTo are the same. Also mapTo is not used anywhere, meaning that change notifications and queries will use the internal property name rather than the public one.

@nirinchev nirinchev self-assigned this Jan 5, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant