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

persist: false properties are being requested in returning clause in 5.5.0 #3664

Closed
lagnat opened this issue Oct 26, 2022 · 2 comments
Closed
Labels
bug Something isn't working

Comments

@lagnat
Copy link

lagnat commented Oct 26, 2022

Describe the bug
After upgrading to 5.5.0, my code is failing because mikro-orm is trying to request columns that do not exist.

To Reproduce
I don't have the bandwidth at the moment to work on a failing test but I wanted to get this reported.

Additional context

     insert into `channel` (.. columns redacted .. ) values ( .. values redacted .. ) returning `is_premium` - SQLITE_ERROR: no such column: is_premium
    @Property({
        persist: false,
        name: 'isPremium',
    })
    get isPremium(): boolean {
        .. code ..
    }

Versions

Dependency Version
node 16.18.0
typescript 4.7.4
mikro-orm 5.5.0
your-driver sqlite
@bnussman
Copy link

Same issue here with PostgreSQL on 5.5.0 when using

@Property({ persist: false })

@PodaruDragos
Copy link
Contributor

PodaruDragos commented Oct 27, 2022

I added a somehow reliable stack trace on a thread in slack.

InvalidFieldNameException
insert into ...........
at PostgreSqlExceptionConverter.convertException
at PostgreSqlDriver.convertException
at processTicksAndRejections
at async PostgreSqlDriver.nativeInsertMany
at async ChangeSetPersister.persistNewEntity 
at async ChangeSetPersister.executeInserts
at async ChangeSetPersister.runForEachSchema
at async UnitOfWork.commitCreateChangeSets
at async UnitOfWork.persistToDatabase.

maybe this can help track down the error, when we can get a repro.

@B4nan B4nan added the bug Something isn't working label Oct 31, 2022
@B4nan B4nan closed this as completed in 35d51fe Oct 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants