georgysavva / scany

Library for scanning data from a database into Go structs and more
MIT License
1.27k stars 67 forks source link

one2many #6

Closed hazcod closed 4 years ago

hazcod commented 4 years ago

Hi, is there support for one2many relationships? e.g.


type User struct {}
type Book struct {
  Authors []User
}
georgysavva commented 4 years ago

Hi. Thanks for your question! No, it isn't supported. This library isn't an ORM, it knows nothing about your relations. It just helps to scan data from rows into structs in a flat manner. Maybe I should update the readme to better describe that.

georgysavva commented 4 years ago

Closing due to inactivity. Feel free to reopen if needed.