-
Notifications
You must be signed in to change notification settings - Fork 0
Support more type and relationship #4
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
Comments
Cauz for now, Typescript doesn't support complex type reflection. The only way to handle this issue is to support Types and Relationships in Decorators, it looks like: @Entity(alias?)
class Foo {
@Column(alias? | Type?)
bucket: Type;
} This is really important, only when we finish this, the Torm.js can be used. This is the core features of Torm.js. |
Firstly, @OneToMany(type => Person, person => person.id) Don't know what you mean in the example. Why not try @OneToMany(type => Person, person => "id") And you mention |
@yfwz100 yeah. you're right! What I want to do here is to set a foreign key.
|
Got the idea. In Mongoose-like ORM in javascript, the complex type is modeled as a new class. I think we can adopt this. The drafted syntax could be like
where |
@yfwz100 , that's exactly what I want |
Uh oh!
There was an error while loading. Please reload this page.
Typescript can not support complex type reflection, I consider supporting it by this way:
The text was updated successfully, but these errors were encountered: