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

Support for nested properties setting customKey in collection.add() method? #88

Closed
paolospag opened this issue Feb 25, 2019 · 6 comments
Assignees
Labels
enhancement New feature or request

Comments

@paolospag
Copy link

Hi,
I'm using this awesome library to perform nearby query, but I noticed a limit when call add() method providing customKey param: I'm not able to set nested properties of data object, i.e. place.coordinates, and looking at the code I found this limit in utils.ts: https://github.com/geofirestore/geofirestore-js/blob/master/src/utils.ts#L295

My question: is it possible to add support for nested properties? I would like to do something like that:

const geofirestore = new GeoFirestore(firebase.firestore());
const geocollection = geofirestore.collection('availabilities');
export const createGeoData = (data) => geocollection.add(data, 'place.coordinates');

Probably this isn't a bug issue or something like that, but it could be an enhancement.

@MichaelSolati MichaelSolati self-assigned this Feb 28, 2019
@MichaelSolati MichaelSolati added the enhancement New feature or request label Feb 28, 2019
@paolospag
Copy link
Author

@MichaelSolati any update on this?

@MichaelSolati
Copy link
Owner

MichaelSolati commented Mar 20, 2019

I have a plan in mind but I just haven't had time to get to this. I should have something by the end of the month though

@paolospag
Copy link
Author

@MichaelSolati I need this feature as soon as possible, when do you think it will be available?

@MichaelSolati
Copy link
Owner

@paolospag So I think this will work, it required more work then I thought and as I have been traveling I haven't had the time to fix it.

npm i geofirestore/geofirestore-js#feat/findCoordinates

If it works I'll deploy it to NPM.

@paolospag
Copy link
Author

@MichaelSolati Sorry for my late response. Thank you for the stuff, I'll take a look tomorrow and I'll let you know.

@paolospag
Copy link
Author

@MichaelSolati I confirm that it now works exactly as I expected, thanks a lot!

Please notify me on this issue when you deploy it to npm, then you can close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants