@@ -29,6 +29,18 @@ import (
"github.com/go-xorm/core"
)
+type Foo struct {
+ Baz string `xorm:`
+}
+
+// Implement the TableName interface to generate a fully custom table name for
+// a struct type.
+//
+// @see xorm.TableName interface.
+func (f Foo) TableName() string {
+ return "foobar";
func check(err error) {
if err != nil {
fmt.Println(err.Error())