prepend package name for mappers documentation #12
|
@ -9,7 +9,7 @@ Use `xorm.IMapper` interface to set the name mapping rule. There are three rules
|
||||||
SnakeMapper is the default. You can change it use `SetMapper`.
|
SnakeMapper is the default. You can change it use `SetMapper`.
|
||||||
|
|
||||||
```Go
|
```Go
|
||||||
engine.SetMapper(SameMapper{})
|
engine.SetMapper(core.SameMapper{})
|
||||||
```
|
```
|
||||||
|
|
||||||
And you should notice:
|
And you should notice:
|
||||||
|
@ -18,8 +18,8 @@ And you should notice:
|
||||||
* Tables's mapping rule could be different from Columns':
|
* Tables's mapping rule could be different from Columns':
|
||||||
|
|
||||||
```Go
|
```Go
|
||||||
engine.SetTableMapper(SameMapper{})
|
engine.SetTableMapper(core.SameMapper{})
|
||||||
engine.SetColumnMapper(SnakeMapper{})
|
engine.SetColumnMapper(core.SnakeMapper{})
|
||||||
```
|
```
|
||||||
|
|
||||||
When a struct auto mapping to a database's table, the below table describes how they change to each other:
|
When a struct auto mapping to a database's table, the below table describes how they change to each other:
|
||||||
|
|
Reference in New Issue
Block a user