Comments (2)
use objectID in ID field for the user(generated) entity;
I didn't understand. Could you proved a code example?
from herbs-cli.
I'm sorry, maybe I'm not clear.
We generate a random number for User.id as we do for SQL databases here, we could just define the id as string, so insert the User using a ObjectID id instead
change this:
<% if(!props.mongo){ %>ctx.<%- props.name.camelCase %>.id = Math.floor(Math.random() * 100000).toString()<% } %>
for this:
ctx.<%- props.name.camelCase %>.id = new ObjectId()
from herbs-cli.
Related Issues (20)
- Usecases folders not beeing generated if user don't choose to run npm install and herbs update
- Project break when author name is not standarized HOT 1
- Entity schema to Request schema HOT 2
- Console layer HOT 9
- herbs update - Entities with relationship HOT 1
- herbs update - Wrong type of return HOT 2
- We need to improve the tests HOT 3
- Error when create a project in Linux HOT 3
- Problem to genereate a new project with git repository HOT 1
- The new project was generated with a server but has no graphql or rest layer HOT 4
- Create a new project without support to database HOT 2
- Error weh create a project with SQL Server HOT 1
- Error encrypt SQL Server connection String
- fix env port api
- Herbs spec (Aloe) CLI command should run "pure" specs - without usecase or metadata about usecase
- Path as a parameter to herbs update and herbs spec
- Add example to set windows env at cmd
- unit test not working
- Herbs generated project must born with gitignore file event not initializing a new git repository HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from herbs-cli.