Alled for old style mysql no FK relation
Even though your db may not use foreign key constraints, you can (and should) still use the `ForeignKeyField` to access them, unless I misunderstand the issue.

Perhaps you could send me some models that you are using, or how you use this patch.
 HI Charles, Thanks for the Feedback.. let me try the FKField and Ill let
you know how it goes.. Apologies I dont know how, but I did miss this in
the documentation.

All the best
Ross

On Sat, Feb 2, 2013 at 1:52 AM, Charles Leifer notifications@github.comwrote:

> Even though your db may not use foreign key constraints, you can (and
> should) still use the ForeignKeyField to access them, unless I
> misunderstand the issue.
> 
> Perhaps you could send me some models that you are using, or how you use
> this patch.
> 
> —
> Reply to this email directly or view it on GitHubhttps://github.com/coleifer/peewee/pull/158#issuecomment-13021749.
 I rewrote some of the join code to be a little more flexible in case you want to join on something that may not be a foreignkeyfield.  Commit d1e5a4845383b4

The way you might do it is:

``` python

class User(Model):
    username= CharField()

class Comment(Model):
    username = CharField()
    message = CharField()

# Say you want to join comments with their user
Comment.select(Comment, User).join(User, on=(Comment.username == User.username))
```
 Hi there!

That is perfect! and also more intuitive! Thank you very much.

I must say Im quite enjoying using peewee. It feels a little ungainly on
larger queries but that is a symptom all ORMs suffer from I think.

All the best!

Ross

On Sun, Feb 3, 2013 at 4:06 AM, Charles Leifer notifications@github.comwrote:

> I rewrote some of the join code to be a little more flexible in case you
> want to join on something that may not be a foreignkeyfield. Commit
> d1e5a48 https://github.com/coleifer/peewee/commit/d1e5a4845383b4
> 
> The way you might do it is:
> 
> class User(Model):
>     username= CharField()
> class Comment(Model):
>     username = CharField()
>     message = CharField()
> 
> # Say you want to join comments with their userComment.select(Comment, User).join(User, on=(Comment.username == User.username))
> 
>  —
> Reply to this email directly or view it on GitHubhttps://github.com/coleifer/peewee/pull/158#issuecomment-13041552.

Hi there, we have a very old db that has no FKs defined.

Currently its not possible (or seems not) to perform joins on elements that have no FK

This is a minor patch for it.. 
