elersong / fireorm24

ORM for Firebase Firestore 🔥 updated for 2024
MIT License
1 stars 0 forks source link

Fix getRepository for Collections and Subcollections with the Same Name #25

Open elersong opened 3 months ago

elersong commented 3 months ago

Description

When naming a collection and a subcollection with the same name, the getRepository function returns incorrect results. This issue arises due to the way getRepository prioritizes collections and subcollections.

Steps to Reproduce

  1. Create a collection and a subcollection with the same name.
  2. Use getRepository to retrieve the repository.
  3. Observe that the incorrect repository is returned.

Expected Behavior

The getRepository function should correctly distinguish between collections and subcollections with the same name, giving priority to collections.

Actual Behavior

The getRepository function returns the wrong repository when collections and subcollections have the same name.

Acceptance Criteria

Additional Context

Original Issue

elersong commented 3 months ago

Possibly connected to #32