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

realm generate will modify previous RealmObject #1810

Closed
norman93sun opened this issue Dec 10, 2024 · 1 comment
Closed

realm generate will modify previous RealmObject #1810

norman93sun opened this issue Dec 10, 2024 · 1 comment

Comments

@norman93sun
Copy link

Problem

When I create a new @RealmModel()
then run dart run realm generate

All code I added or changed in previous RealmObject file will be removed.

How can i prevent this by only create an new RealmObject.

Solution

No response

Alternatives

No response

How important is this improvement for you?

Would be a major improvement

Feature would mainly be used with

Local Database only

@nirinchev
Copy link
Member

You should not be modifying the generated code. Instead, you'd probably want to create an extension where you put the additional functionality you want to add to your model.

@nirinchev nirinchev closed this as not planned Won't fix, can't repro, duplicate, stale Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants