AsyncCollection.pluck returns undefined values #17

Open
opened 2 years ago by garrettmills · 0 comments
Owner

Calling .pluck('identifier') on the query below results in a collection of undefined values, even though the fields exist on the results:

await this.builder()
            .connection('default')
            .select('identifier')
            .from('migrations')
            .whereIn('identifier', identifiers)
            .get()
            .pluck<string>('identifier')

In contrast, collecting the results to a normal Collection works fine:

(await this.builder()
            .connection('default')
            .select('identifier')
            .from('migrations')
            .whereIn('identifier', identifiers)
            .get()
            .collect())
            .pluck<string>('identifier')
Calling `.pluck('identifier')` on the query below results in a collection of `undefined` values, even though the fields exist on the results: ```ts await this.builder() .connection('default') .select('identifier') .from('migrations') .whereIn('identifier', identifiers) .get() .pluck<string>('identifier') ``` In contrast, collecting the results to a normal Collection works fine: ```ts (await this.builder() .connection('default') .select('identifier') .from('migrations') .whereIn('identifier', identifiers) .get() .collect()) .pluck<string>('identifier') ```
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: extollo/lib#17
Loading…
There is no content yet.