agrosner / agrosner/DBFlow

Ambiguous columns use the last ambiguous column value as the value

Aberta
#1,592 2 comentários 0 reações 0 responsáveis Ver no GitHub
Linguagem predominante
Kotlin
Estrelas
4.8k
Forks
593
Merge médio
1min
PRs com merge (30d)
1

Descrição

**DBFlow Version:** 4.2.4

**Bug or Feature Request:** Bug

**Description:**
When attempting to query a double inner join, the last column "id" is the value no matter which table you are selecting from.

For example:
Table 1 is a pivot table:
```
id, storeId, storeId2
```
and Table 2 has extra information:
```
id, store_name, store_coords
```

So if I want to do a join to combine these two records into one row into a list I would use `FlowCursorList`
```
FlowCursorList.Builder(SQLite.select()
.from(Table1::class.java)
.innerJoin(Table2::class.java).on(Table2_Table.id).eq(Table1_Table.storeId)
.innerJoin(Table2::class.java).on(Table2_Table.id).eq(Table1_Table.storeId2))
// ...where/orderBy cut for brevity
.build()
```

This always results in storeId2's Id being selected when using `Table1.id` in my adapter. I've tried using aliases, and selecting the columns manually, but nothing seems to fix it.

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.