emilsjolander/sprinkles — pull request #35 by jdreesen (2014-02-02 15:17:21+00:00)
Title: Implicit table and column names

Often the field name and column name are the same, so it's not needed to define it explicitly. Thats why I changed the argument of the @Column and @DynamicColumn annotations to be optional. If it isn't set, the SQL column name will be the same as the model's field name.

For the @Table annotation I've done the same, so if you don't explicitly define a table name, the class name of the model will be used.

We could also add some (optional) inflection to automatically translate class/field names to table/column names e.g. from "createdAt" to "created_at" (with an interface, so that users could create their own naming strategies, of course). But maybe thats too much magic...