Skip to content

Commit

Permalink
fix(core): support hidden flag on primary keys
Browse files Browse the repository at this point in the history
  • Loading branch information
B4nan committed Nov 11, 2022
1 parent d32c956 commit 4935505
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/src/entity/EntityTransformer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { ReferenceType } from '../enums';
function isVisible<T>(meta: EntityMetadata<T>, propName: string, ignoreFields: string[]): boolean {
const prop = meta.properties[propName];
const visible = prop && !prop.hidden;
const prefixed = prop && !prop.primary && propName.startsWith('_'); // ignore prefixed properties, if it's not a PK
const prefixed = prop && propName.startsWith('_'); // ignore prefixed properties, if it's not a PK

return visible && !prefixed && !ignoreFields.includes(propName);
}
Expand Down

0 comments on commit 4935505

Please sign in to comment.