These are chat archives for jinzhu/gorm

12th
May 2016
oorococo
@oorococo
May 12 2016 04:49
Anybody konw How to do self mapping in Gorm ?
ianseyer
@ianseyer
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 {
        gorm.Model
        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
ianseyer
@ianseyer
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{}