Git Product home page Git Product logo

webleedev / typeorm Goto Github PK

View Code? Open in Web Editor NEW

This project forked from weblee-co/typeorm

0.0 0.0 0.0 11.51 MB

ORM for TypeScript and JavaScript (ES7, ES6, ES5). Supports MySQL, PostgreSQL, MariaDB, SQLite, MS SQL Server, Oracle, WebSQL databases. Works in NodeJS, Browser, Ionic, Cordova and Electron platforms.

Home Page: http://typeorm.io

License: MIT License

JavaScript 0.25% TypeScript 99.75%

typeorm's People

typeorm's Issues

Invalid empty update query on cascade save

Issue type:

[ ] question
[x] bug report
[ ] feature request
[ ] documentation issue

Database system/driver:

[ ] cordova
[ ] mongodb
[ ] mssql
[x] mysql / mariadb
[ ] oracle
[ ] postgres
[ ] sqlite
[ ] sqljs
[ ] react-native
[ ] expo

TypeORM version:

[ ] latest
[x] @next
[ ] 0.x.x (or put your version here)

Steps to reproduce or a small repository showing the problem:
Creating a large object with lots of relations can yield an update query in mysql without any values which is invalid in mysql.

UPDATE abc SET WHERE id in (NN)

definition of relational column and relation causes duplicate params when updating

Issue type:

[ ] question
[x] bug report
[ ] feature request
[ ] documentation issue

Database system/driver:

[ ] cordova
[ ] mongodb
[ ] mssql
[x] mysql / mariadb
[ ] oracle
[ ] postgres
[ ] sqlite
[ ] sqljs
[ ] react-native
[ ] expo

TypeORM version:

[ ] latest
[x] @next
[ ] 0.x.x (or put your version here)

Steps to reproduce or a small repository showing the problem:

@Entity()
class Parent {
  @PrimaryGeneratedColumn()
  id: number;

  @OneToMan(type => Child, Child => Child.parent)
  children: Child[]
}

@Entity()
class Child {

  @PrimaryGeneratedColumn()
  id: number;

  @Column({
    name: "parent_id"
    type: "int"
  })
  parentId: number;

  @ManyToOne(type => Parent, Parent => Parent.children)
  @JoinColumn({name: "parent_id"})
  parent: Parent;
}

const entityManager = typeorm.getConnection().getEntityManager();

const aParent = new Parent();
entityManager.save(aParent);

const aChild = new Child();
aChild.parentId = aParent.id;
aChild.parent = aParent;
entityManager.save(aChild);

doesn't save parent model before one-to-many relations when primary key is predefined

Issue type:

[ ] question
[X] bug report
[ ] feature request
[ ] documentation issue

Database system/driver:

[ ] cordova
[ ] mongodb
[ ] mssql
[X] mysql / mariadb
[ ] oracle
[ ] postgres
[ ] sqlite
[ ] sqljs
[ ] react-native
[ ] expo

TypeORM version:

[ ] latest
[X] @next
[ ] 0.x.x (or put your version here)

Steps to reproduce or a small repository showing the problem:

missing value on insert for STI entities

Issue type:

[ ] question
[x] bug report
[ ] feature request
[ ] documentation issue

Database system/driver:

[ ] cordova
[ ] mongodb
[ ] mssql
[x] mysql / mariadb
[ ] oracle
[ ] postgres
[ ] sqlite
[ ] sqljs
[ ] react-native
[ ] expo

TypeORM version:

[ ] latest
[x] @next
[ ] 0.x.x (or put your version here)

Steps to reproduce or a small repository showing the problem:

  1. define entity with child inheritance
  2. define shared column for each child entity

notice some entities may not be inserted correctly if all entities used in save operation

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.