Skip to content

fetch-by-id requires :id to be of type ObjectId #7

@scotthernandez

Description

@scotthernandez

If I'm reading this code correctly, and it is very possible I am not... It seems like a limitation if you store other types of values in your _id field. It is best not to make assumptions like this about types; it is also good not to coerce strings -> ObjectId as you have a chance of missing valid string values. If you really must do this at least check to see if the string is a valid ObjectId first.

https://github.com/wilkes/karras/blob/master/src/karras/collection.clj#L170

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions