Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for single table inheritance #33

Closed
B4nan opened this issue Apr 3, 2019 · 2 comments
Closed

Add support for single table inheritance #33

B4nan opened this issue Apr 3, 2019 · 2 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@B4nan
Copy link
Member

B4nan commented Apr 3, 2019

Similar to what doctrine implements: https://www.doctrine-project.org/projects/doctrine-orm/en/2.6/reference/inheritance-mapping.html#single-table-inheritance

But less verbose (one decorator should be enough).

@jeesus
Copy link

jeesus commented Mar 18, 2020

Looking forward to it as well. Until then will probably have to continue with TypeORM.

@B4nan B4nan added this to the 4.0 milestone Apr 1, 2020
@B4nan B4nan self-assigned this Apr 20, 2020
B4nan added a commit that referenced this issue Apr 21, 2020
```typescript
@entity({
  discriminatorColumn: 'discr',
  discriminatorMap: { person: 'Person', employee: 'Employee' },
})
export class Person {
  // ...
}

@entity()
export class Employee extends Person {
  // ...
}
```

Closes #33
B4nan added a commit that referenced this issue Apr 22, 2020
```typescript
@entity({
  discriminatorColumn: 'discr',
  discriminatorMap: { person: 'Person', employee: 'Employee' },
})
export class Person {
  // ...
}

@entity()
export class Employee extends Person {
  // ...
}
```

Closes #33
B4nan added a commit that referenced this issue Apr 22, 2020
```typescript
@entity({
  discriminatorColumn: 'discr',
  discriminatorMap: { person: 'Person', employee: 'Employee' },
})
export class Person {
  // ...
}

@entity()
export class Employee extends Person {
  // ...
}
```

Closes #33
@B4nan
Copy link
Member Author

B4nan commented Apr 22, 2020

Closing as implemented in dev branch.

@B4nan B4nan closed this as completed Apr 22, 2020
B4nan added a commit that referenced this issue Apr 25, 2020
```typescript
@entity({
  discriminatorColumn: 'discr',
  discriminatorMap: { person: 'Person', employee: 'Employee' },
})
export class Person {
  // ...
}

@entity()
export class Employee extends Person {
  // ...
}
```

Closes #33
B4nan added a commit that referenced this issue Apr 26, 2020
```typescript
@entity({
  discriminatorColumn: 'discr',
  discriminatorMap: { person: 'Person', employee: 'Employee' },
})
export class Person {
  // ...
}

@entity()
export class Employee extends Person {
  // ...
}
```

Closes #33
@B4nan B4nan mentioned this issue Apr 26, 2020
B4nan added a commit that referenced this issue Apr 29, 2020
```typescript
@entity({
  discriminatorColumn: 'discr',
  discriminatorMap: { person: 'Person', employee: 'Employee' },
})
export class Person {
  // ...
}

@entity()
export class Employee extends Person {
  // ...
}
```

Closes #33
@B4nan B4nan mentioned this issue Apr 30, 2020
46 tasks
B4nan added a commit that referenced this issue May 3, 2020
```typescript
@entity({
  discriminatorColumn: 'discr',
  discriminatorMap: { person: 'Person', employee: 'Employee' },
})
export class Person {
  // ...
}

@entity()
export class Employee extends Person {
  // ...
}
```

Closes #33
B4nan added a commit that referenced this issue May 21, 2020
```typescript
@entity({
  discriminatorColumn: 'discr',
  discriminatorMap: { person: 'Person', employee: 'Employee' },
})
export class Person {
  // ...
}

@entity()
export class Employee extends Person {
  // ...
}
```

Closes #33
B4nan added a commit that referenced this issue Jun 1, 2020
```typescript
@entity({
  discriminatorColumn: 'discr',
  discriminatorMap: { person: 'Person', employee: 'Employee' },
})
export class Person {
  // ...
}

@entity()
export class Employee extends Person {
  // ...
}
```

Closes #33
B4nan added a commit that referenced this issue Jun 5, 2020
```typescript
@entity({
  discriminatorColumn: 'discr',
  discriminatorMap: { person: 'Person', employee: 'Employee' },
})
export class Person {
  // ...
}

@entity()
export class Employee extends Person {
  // ...
}
```

Closes #33
B4nan added a commit that referenced this issue Jun 16, 2020
```typescript
@entity({
  discriminatorColumn: 'discr',
  discriminatorMap: { person: 'Person', employee: 'Employee' },
})
export class Person {
  // ...
}

@entity()
export class Employee extends Person {
  // ...
}
```

Closes #33
B4nan added a commit that referenced this issue Aug 2, 2020
```typescript
@entity({
  discriminatorColumn: 'discr',
  discriminatorMap: { person: 'Person', employee: 'Employee' },
})
export class Person {
  // ...
}

@entity()
export class Employee extends Person {
  // ...
}
```

Closes #33
B4nan added a commit that referenced this issue Aug 9, 2020
```typescript
@entity({
  discriminatorColumn: 'discr',
  discriminatorMap: { person: 'Person', employee: 'Employee' },
})
export class Person {
  // ...
}

@entity()
export class Employee extends Person {
  // ...
}
```

Closes #33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants