Prefetch with many ForeignKeyField to same model
Seems to be working OK for me:

```python
class State(db.Model):
    name = TextField()
    def __str__(self):
        return self.name

class Transition(db.Model):
    source_state = ForeignKeyField(State, backref='sources')
    target_state = ForeignKeyField(State, backref='targets')
    def __str__(self):
        return '%s->%s' % (self.source_state, self.target_state)

db.create_tables([State, Transition])

s1 = State.create(name='s1')
s2a = State.create(name='s2-a')
s2b = State.create(name='s2-b')
s3 = State.create(name='s3')
Transition.create(source_state=s1, target_state=s2a)
Transition.create(source_state=s1, target_state=s2b)
Transition.create(source_state=s2a, target_state=s3)
Transition.create(source_state=s2b, target_state=s3)

query = State.select().where(State.name != 's3')
transitions = Transition.select()
p = prefetch(query, transitions, prefetch_type=PREFETCH_TYPE.JOIN)
for row in p:
    print(row.name, row.sources, row.targets)
```

Output as expected:

```
s1 [<Transition: s1->s2-a>, <Transition: s1->s2-b>] []
s2-a [<Transition: s2-a->s3>] [<Transition: s1->s2-a>]
s2-b [<Transition: s2-b->s3>] [<Transition: s1->s2-b>]
``` The above code also gives an error:
```
psycopg2.errors.AmbiguousColumn: column reference "id" is ambiguous
LINE 1: ...AS "t2" WHERE ("t2"."name" != 's3')) AS "t3" ON (("t3"."id" ...
                                                             ^
```
Query:
```
('SELECT DISTINCT "t1"."id", "t1"."source_state_id", "t1"."target_state_id" FROM "transition" AS "t1"
 INNER JOIN (SELECT "t2"."id", "t2"."id" FROM "state" AS "t2" WHERE ("t2"."name" != %s)) AS "t3"
 ON (("t3"."id" = "t1"."source_state_id") OR ("t3"."id" = "t1"."target_state_id"))', ['s3'])
```
Сhecked on the latest version 3.16.0.  
Database - PostgreSQL 10.23 Oh no, I tested with SQLite so I assumed it was ok. Reopening and will look into it, thanks for letting me know. This is now fixed, thanks again.
Hello!
I'm have 2 models:
```
class State(Entity):
    uuid = UUIDField(column_name='uuid', primary_key=True)

class Transition(Entity):
    uuid = UUIDField(column_name='uuid', primary_key=True)
    source_state = ForeignKeyField(State, column_name='source_state_id', backref='_db_source_transitions')
    target_state = ForeignKeyField(State, column_name='target_state_id', backref='_db_target_transitions')
```
I'm trying load `State` entity and all his `Transition`:
```
states = State.select().where(...)
transitions = Transition.select()
states = prefetch(states, transitions, prefetch_type=PREFETCH_TYPE.JOIN)
```
I get the following query:
```
SELECT ... FROM "transition" AS "t1" 
INNER JOIN (SELECT "t2"."uuid", "t2"."uuid" FROM "state" AS "t2" WHERE (...)) AS "t3" 
ON (("t3"."uuid" = "t1"."source_state_id") OR ("t3"."uuid" = "t1"."target_state_id"))
```
and error in ON statement:
```
column reference "uuid" is ambiguous
```
Is there a way to specify the single foreign key used or is it a bug?