Skip to content

Support table with composite key but no column id #135

@huangyingjie

Description

@huangyingjie

Hi,
Here is part of my table:

mysql> desc webperformance;
+--------------------------+--------------+------+-----+---------+-------+
| Field                    | Type         | Null | Key | Default | Extra |
+--------------------------+--------------+------+-----+---------+-------+
| datekey                  | int(10)      | NO   | PRI |         |       |
| domain                   | varchar(30)  | NO   | PRI |         |       |
| url                      | varchar(128) | NO   | PRI |         |       |
| domainLookupTime         | int(10)      | YES  |     | NULL    |       |
| connectEstablishTime     | int(10)      | YES  |     | NULL    |       |

It has a composite key with 3 columns datekey,domain and url, and has no id.
I know that the orm might expect every table has a primary key named id or just specify a column instead. I just wander it also spports composite key, thanks.
Just come from #132

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions