Code Monkey home page Code Monkey logo

Comments (5)

Aurelsicoko avatar Aurelsicoko commented on July 19, 2024

@schickling Do you have any thoughts about this? It seems the problem has been raised with Prisma (prisma/prisma1#1772) as well.

from opencrud.

SachaG avatar SachaG commented on July 19, 2024

I had that question as well but after discussing it with a couple people I think the conclusion was that this case is rare enough that we can keep the "+s" convention. Also, people can always find their own workaround, like naming the type NewsArticle instead of just News for example.

I think adding "all" in the rare cases where the problem does happen is a good solution though.

from opencrud.

Aurelsicoko avatar Aurelsicoko commented on July 19, 2024

We should add this to the specs though. I found a list (not sure it's exhaustive) with all the words which have no plural and where we should use the all prefix instead.

from opencrud.

jesstelford avatar jesstelford commented on July 19, 2024

That list is far from exhaustive too. Another example is equipment.

The way we've dealt with it is to throw a helpful error at the application level during startup when there's a plural/singular conflict. Forces the application developer to work around it by renaming.

from opencrud.

molomby avatar molomby commented on July 19, 2024

Previously I've referenced the list used by Mongoose. In addition to the above, it includes:

cooperation, deer, digestion, energy, excretion, expertise, fish, health, justice, labour, machinery, media, moose, paper, pollution, rain, rice, series, sewage, sheep, species, status

from opencrud.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.