tink_sql
                                
                                 tink_sql copied to clipboard
                                
                                    tink_sql copied to clipboard
                            
                            
                            
                        Support foreign keys in create table query
Proposed syntax:
@:foreign(User, id) var userId:Id<User>;
Sounds good. An interesting question is how exactly the table should be identified (ideally it would be the name of the field on the database object that holds the table).
This is tricky. Easiest way is to let user specify the table name @:foreign('table_name', id).
Problem is that, we can't know table name from the table class itself.