These are chat archives for jinzhu/gorm

May 2016
May 12 2016 04:49
Anybody konw How to do self mapping in Gorm ?
May 12 2016 19:23
Hi all!
I am finding that my schema is failing silently
I am attempting to use PostGRES' JSONB datatype
via Relations []stringsql:"type:JSONB NOT NULL DEFAULT '{}'::JSONB"``
full schema:
//our Article definition
type Article struct {
        Title string `gorm:"not null;unique"`
        Url string
        Raw string `sql:"text"`
        Relations []string `sql:"type:JSONB NOT NULL DEFAULT '{}'::JSONB"`
        Filename string
everything but Relations (and Filename, as a result I imagine of relations failing) is being created
May 12 2016 22:09
beyond that issue
even after manually creating the schema
I get a (sql: converting Exec argument #6's type: unsupported type []string, a slice)
trying to insert the following object into the Relations column: relations := []string{}