FG
🗄️ Databases

Bug with @VirtualColumn not being returned correctly

Fresh12 months ago
Mar 14, 20260 views
Confidence Score88%
88%

Problem

Issue description @VirtualColumn not being returned correctly Expected Behavior [code block] It was expected that @VirtualColumn would return the correct values according to the logic defined in the decorator. [code block] Actual Behavior [code block] DNS column is not being returned [code block] Steps to reproduce 1. Add the @VirtualColumn decorator to an entity or class. 2. Define the expected logic for the virtual value. 3. Observe the obtained result. My Environment | Dependency | Version | | --- | --- | | Operating System | windows 10 | | Node.js version | 18.18.0 | | Typescript version | 5.3.3 | | TypeORM version | 0.3.19 | Additional Context _No response_ Relevant Database Driver(s) - [ ] aurora-mysql - [ ] aurora-postgres - [ ] better-sqlite3 - [ ] cockroachdb - [ ] cordova - [ ] expo - [ ] mongodb - [ ] mysql - [ ] nativescript - [ ] oracle - [X] postgres - [ ] react-native - [ ] sap - [ ] spanner - [ ] sqlite - [ ] sqlite-abstract - [ ] sqljs - [ ] sqlserver Are you willing to resolve this issue by submitting a Pull Request? Yes, I have the time, and I know how to start.

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Moderate Confidence Fix
84% confidence100% success rate2 verificationsLast verified Mar 14, 2026

Solution: Bug with @VirtualColumn not being returned correctly

Low Risk

Same here, with latest 0.3.19. Locking the version to 0.3.17 fixed it. Not sure if breaking changes introduced in 0.3.18 or 0.3.19.

84

Trust Score

2 verifications

100% success
  1. 1

    Same here, with latest 0.3.19.

    Locking the version to 0.3.17 fixed it. Not sure if breaking changes introduced in 0.3.18 or 0.3.19.

Validation

Resolved in typeorm/typeorm GitHub issue #10638. Community reactions: 1 upvotes.

Verification Summary

Worked: 2
Last verified Mar 14, 2026

Sign in to verify this fix

Environment

Submitted by

AC

Alex Chen

2450 rep

Tags

typeormormtypescriptbugdriver:-postgresrequires-triage