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

Property 'mnumainmenu.Availability' of type 'object' has unknown object type 'Availability' #1805

Open
DhananjayaEcologital opened this issue Oct 29, 2024 · 1 comment

Comments

@DhananjayaEcologital
Copy link

What happened?

Im Trying to add List item to my exciting realm model. And when i add string properly there is no issues shows. but when i try to add list property is shows Error.

Repro steps

1

Version

sdk: '>=3.0.6 <4.0.0'

What Atlas Services are you using?

Atlas Device Sync

What type of application is this?

Flutter Application

Client OS and version

1

Code snippets

import 'package:realm/realm.dart';
part 'mnu_main_menu.realm.dart';

@RealmModel()
@mapto('mnumainmenu')
class _Mnumainmenu {
@PrimaryKey()
@mapto('_id')
ObjectId? id;

@mapto('CloudLocationID')
String? cloudLocationID;

@mapto('IsDeleted')
bool? isDeleted;

@mapto('ItemName')
_MnumainmenuItemName? itemName;

@mapto('LocalID')
int? localID;

@mapto('OrderIndex')
int? orderIndex;

@mapto('ShowMenu')
bool? showMenu;

@mapto('Availability')
_Availability? availability;
}

@RealmModel(ObjectType.embeddedObject)
@mapto('mnumainmenu_ItemName')
class _MnumainmenuItemName {
@mapto('Translations')
_MnumainmenuItemNameTranslations? translations;
}

@RealmModel(ObjectType.embeddedObject)
@mapto('mnumainmenu_ItemName_Translations')
class _MnumainmenuItemNameTranslations {
String? en;
}

@RealmModel(ObjectType.embeddedObject)
class _Availability {
@mapto('Sunday')
List<_TimeEntity> sunday = [];
}

@RealmModel(ObjectType.embeddedObject)
class _TimeEntity {
@mapto('StartTime')
String? start;

@mapto('EndTime')
String? end;
}

Stacktrace of the exception/crash you're getting

'

Relevant log output

_createRealm() error ::: RealmException: Failed to open realm: Schema validation failed due to the following errors:
      - Property 'mnumainmenu.Availability' of type 'object' has unknown object type 'Availability'
Copy link

sync-by-unito bot commented Oct 29, 2024

➤ PM Bot commented:

Jira ticket: RDART-1108

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

1 participant