Skip to content
This repository has been archived by the owner on Oct 14, 2020. It is now read-only.

id or _id is not pushed to *.interface.ts #53

Closed
murbanowicz opened this issue Sep 24, 2018 · 6 comments
Closed

id or _id is not pushed to *.interface.ts #53

murbanowicz opened this issue Sep 24, 2018 · 6 comments

Comments

@murbanowicz
Copy link

ID or _id field is not being pushed to the interface file. In my opinon it definitely should.

@eddyystop
Copy link
Member

@j2L4e ^^^

@murbanowicz
Copy link
Author

murbanowicz commented Sep 24, 2018

Where is it handled? I thought to make PR, but I am not sure how can we handle id and _id in one interface without using ? which makes it nightmare to use later on until we will get Elvis operator in TS

@eddyystop
Copy link
Member

I await jsl4e's reply whether he thinks it should be done.

@j2L4e
Copy link
Member

j2L4e commented Sep 24, 2018

Yes, totally! 👍

@eddyystop
Copy link
Member

I'll look into it but its not as easy as it may seem. The JSON-schema has to be DB agnostic and DBs typically use either id or _id. The _id are not always strings.

At present both an id and a _id should be in the JSON-file. An id or _id is hard coded into, say, the name.mongoose.ts.

That does not work for the interface file.

@eddyystop
Copy link
Member

I'll handle #54 tomorrow and I suggest that be used in the meantime to add either an id or _id as a custom field.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants