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

Does mikro-orm 3.6 support embedded entities? #710

Closed
gpanainte opened this issue Aug 5, 2020 · 3 comments
Closed

Does mikro-orm 3.6 support embedded entities? #710

gpanainte opened this issue Aug 5, 2020 · 3 comments
Labels
enhancement New feature or request

Comments

@gpanainte
Copy link

I'm thinking of moving from typeorm to mikro-orm, but I already have a lot of entities defined, and some of them contain embedded entities.

Does mikro-orm 3.6 support this feature? If not, is there any workaround that I could use?

An example of embedded entity in typeorm looks like this:

export class Name {

    @Column()
    first: string;

    @Column()
    last: string;

}

@Entity()
export class User {

    @PrimaryGeneratedColumn()
    id: string;

    @Column(type => Name)
    name: Name;

    @Column()
    isActive: boolean;

}
@gpanainte gpanainte added the enhancement New feature or request label Aug 5, 2020
@B4nan
Copy link
Member

B4nan commented Aug 5, 2020

This is supported in v4, no plans to backport it. I'd say use v4, will be shipping RC probably during weekend, when I am back from vacation.

https://github.com/mikro-orm/mikro-orm/blob/dev/docs/docs/embeddables.md

@B4nan B4nan closed this as completed Aug 5, 2020
@cupcakearmy
Copy link

Is there an example @B4nan? the link you put is down :)

@cupcakearmy
Copy link

NVM found it in the PR #514

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

3 participants