get_id() method returns the foreign key instead of the primary key of model instance
You're joining on `B` but you're selecting from `B_al`. The following works just fine for me:

```python
from peewee import *

db = SqliteDatabase(':memory:')
class Base(Model):
    class Meta:
        database = db

class A(Base):
    a = IntegerField()

class B(Base):
    b = IntegerField()
    a = ForeignKeyField(A)

db.create_tables([A, B])

a1 = A.create(a=1)
b1_1 = B.create(id=100, a=a1, b=11)
b1_2 = B.create(id=101, a=a1, b=12)

B_a = B.alias()
q = A.select(B_a.id, A.id).join(B_a)
for row in q:
    print(row.get_id(), row.b.id)

# outputs
# 1 100
# 1 101
``` I had a typo on my previous text. I meant `join(B_al)` instead of `join(B)`.
The method `get_id()` still returns the foreign key of the model instance (tested on sqlite).
peewee version: 3.13.3

I put the corrected query once again here

```python
B_al = B.alias()
ret = A.select(B_al.id, A.id)
ret = ret.switch(A).join(B_al).objects()
for r in ret:
    print(r.get_id()) 
````
 You are explicitly asking peewee to patch all attributes onto a single instance by calling `.objects()`, so this is completely expected. Your cursor has 2 values, eached named "id" (for A and B). When you call ".objects()" you're telling peewee to just put all cursor values directly onto a single instance, so you're overwriting A's "id" with the "id" for B.

Solutions:

* do not use .objects()
* alias B's id to some other attribute Ah, I see.
Thank you!!
I have the following query (simplified for opening the issue)

``` python
B_al = B.alias()
ret = A.select(B_al.id, A.id)
ret = ret.switch(A).join(B).objects()
for r in ret:
    print(r.get_id()) 
```

Unfortunately, the method `get_id()` unexpectedly returns the foreign key of the table (i.e., B.id) instead of the primary key (i.e., A.id).

