hxtree/galaxyops

Populate on UUID based _id

Closed this issue · 3 comments

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

This works with populate:

@IsUuidV4()
@prop({
type: MongooseSchema.Types.ObjectId,
ref: 'Person',
})
public person: any;

This does not work with populate:

@IsUuidV4()
@prop({
type: MongooseSchema.Types.UUID,
ref: 'Person',
})
public person: any;

Describe the solution you'd like
A clear and concise description of what you want to happen.

Be able to use populate with UUID

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

The issue looks to be due to mongoose and was patched. Should be resolved by upgrading packages.

Automattic/mongoose#13317

Upgrading mongoose to Automattic/mongoose#13595 seems to add functionality.

Implemented.