FirebaseExtended / firestoreodm-flutter

BSD 3-Clause "New" or "Revised" License
33 stars 9 forks source link

The same model in many collections. #18

Open MyisCARRY opened 2 months ago

MyisCARRY commented 2 months ago

Expected Behavior

@Collection<SomeModel>("placeA/*/subPlaceA/*/models")
@Collection<SomeModel>("placeB/*/models")
final modelsRef = ModelsCollectionReference();

I would receive the same model from both collections.

Actual Behavior

I get error:

Defined a collection with duplicate class prefix UserGameInfoModel. Either use a different class, or set a unique class prefix.

And when I set prefix build runner generates new separate model. Which means I would need to duplicate my business logic code even though it should use the same model.