We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
You can continue the conversation there. Go to discussion →
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
When using withConverter on collection it do not fetch inner refs
I have custom type
class CalendarModel { owner: DocumentReference // firestore ref min_book_time_min: number book_time_interval_min: number constructor(owner: DocumentReference, min_book_time_min: number, book_time_interval_min: number) { this.owner = owner this.min_book_time_min = min_book_time_min this.book_time_interval_min = book_time_interval_min } }
and converter
const calendarModelConverter = { toFirestore(cal: CalendarModel): firebase.firestore.DocumentData { return { min_book_time_min: cal.min_book_time_min, book_time_interval_min: cal.book_time_interval_min }; }, fromFirestore( snapshot: firebase.firestore.QueryDocumentSnapshot, options: firebase.firestore.SnapshotOptions ): CalendarModel { const data = snapshot.data(options)!; return new CalendarModel(data.owner, data.min_book_time_min, data.book_time_interval_min); } };
and I do
useCollection(collection(db, `facilities/${facility}/calendars`).withConverter<CalendarModel, DocumentData>(calendarModelConverter))
This yields that owner is not getting fetched automatically. Is there a bug or VuewFire API miss use ? If i skip withConverter, data is fetched.
Refs are populated
Refs are not populated
No response
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Reproduction
When using withConverter on collection it do not fetch inner refs
Steps to reproduce the bug
I have custom type
and converter
and I do
This yields that owner is not getting fetched automatically. Is there a bug or VuewFire API miss use ? If i skip withConverter, data is fetched.
Expected behavior
Refs are populated
Actual behavior
Refs are not populated
Additional information
No response
The text was updated successfully, but these errors were encountered: