How to use the EntitySchema function from typeorm
Find comprehensive JavaScript typeorm.EntitySchema code examples handpicked from public code repositorys.
GitHub: os-js/osjs-database-auth
39 40 41 42 43 44 45 46 47 48
this.name = name; this.groups = groups; } } const UserSchema = new EntitySchema({ name: 'users', target: User, columns: { id: {
4
3
3
+ 9 other calls in file
GitHub: zhangxinggang/nk
117 118 119 120 121 122 123 124 125 126
entity["tableName"] = entity["tableName"] || entity["name"]; if (JSON.parse(ormConnStr)["type"] == "oracle") { entity["tableName"] = entity["tableName"].toUpperCase(); upperJSONKey(entity["columns"]); } return new typeorm.EntitySchema(entity); } }); ormConn(ormConf, entitySchema); }
0
0
1
34 35 36 37 38 39 40 41 42 43
this.initialize(); } async initialize() { const config = await (0, helpers_1.loadConfig)('database'); const entities = await this.getEntities(); const modelEntities = (config.entities || []).map((schema) => new typeorm_1.EntitySchema(schema)); modelEntities.push(...entities); this.datasource = new typeorm_1.DataSource({ ...config, type: config.type,
0
0
1
typeorm.getCustomRepository is the most popular function in typeorm (5799 examples)