Commit Graph

67 Commits

Author SHA1 Message Date
Jinzhu 231effe119 Fix parse blank default value, close #3442 2020-09-10 11:59:18 +08:00
Jinzhu f121622228 Don't add prefix for invalid embedded fields 2020-09-04 14:35:44 +08:00
Jinzhu 6a86646469 Fix use db function as integer's default value, close #3384 2020-09-03 20:41:00 +08:00
Jinzhu 78e9c9b748 raise error when failed to parse default value, close #3378 2020-09-03 18:20:57 +08:00
Jinzhu dbe0f4d8d7 Allow use NULL as default value for string, close #3363 2020-09-02 20:15:12 +08:00
aimuz 9a101c8a08
fmt.Sprint() to strconv.Format (#3354) 2020-09-01 21:03:37 +08:00
Jinzhu cc6a64adfb Support smart migrate, close #3078 2020-08-23 18:16:12 +08:00
Jinzhu f88e8b072c Check valid pointer before use it as Valuer 2020-08-20 18:13:29 +08:00
Jinzhu 3313c11888 Fix embedded struct containing field named ID, close #3286 2020-08-19 19:15:27 +08:00
Jinzhu c1782d60c1 Fix embedded scanner/valuer, close #3283 2020-08-19 15:47:08 +08:00
Jinzhu dc48e04896 Fix nested embedded struct, close #3278 2020-08-18 11:21:40 +08:00
Jinzhu 681268cc43 Refactor Create/Query/Update/DeleteClauses interface 2020-08-17 16:31:09 +08:00
Jinzhu 6834c25cec Fix stack overflow for embedded self-referred associations, close #3269 2020-08-17 12:02:46 +08:00
Jinzhu 7d45833f3e Fix driver.Valuer interface returns nil, close #3248 2020-08-13 12:05:55 +08:00
Jinzhu a3dda47afa Don't parse ignored anonymous field 2020-08-13 10:23:23 +08:00
Jinzhu ff985b90cc Fix failed to guess relations for embedded types, close #3224 2020-08-04 12:25:34 +08:00
lninl 7bb883b665
Auto creating/updating time with unix (milli) second (#3213)
* Auto creating/updating time with unix (milli) second

* add test for 'Auto creating/updating time with unix (milli) second'
2020-07-30 17:39:57 +08:00
Jinzhu 47a5196734 Fix uninitialized Valuer return time.Time, close #3214 2020-07-30 17:37:07 +08:00
Jinzhu 7c2ecdfc1c Fix use pointer of Valuer as foreign key, close #3212 2020-07-30 10:23:35 +08:00
Jinzhu 2cbdd29f26 Returns error for invalid embedded field, close #3209 2020-07-29 10:23:14 +08:00
Jinzhu ef002fd7ac Add GORMDataType to Field, close #3171 2020-07-20 19:00:03 +08:00
Jinzhu 6dc583869b Don't use value's first field to guess data type for struct implements GormDataTypeInterface 2020-07-17 12:02:00 +08:00
Jinzhu 4456df7a5d Lint with golangci-lint 2020-07-16 11:27:12 +08:00
Jinzhu 0028246ea5 Don't set DefaultValueInterface when DefaultValue not set, close #3152 2020-07-16 10:19:24 +08:00
Jinzhu 90a40361ed Fix set bool field from null 2020-07-04 08:21:23 +08:00
Jinzhu 6b98ced13d Fix set time field from null, close #3108 2020-07-04 07:45:07 +08:00
Jinzhu 2476c0fbb4 Set db type after autotime 2020-06-26 07:26:45 +08:00
Jinzhu e77e7bb842 Fix nested embedded field with pointer, close #3071 2020-06-23 09:12:57 +08:00
Jinzhu d4d339f3b5 Handle data type cases 2020-06-19 22:51:46 +08:00
Jinzhu 07960fe661 Fix []byte support 2020-06-18 11:24:08 +08:00
Jinzhu 96368eb967 Test embedded struct implements Scan & Value interface 2020-06-18 09:15:23 +08:00
Jinzhu 6b2f37189e Fix few cases with postgres 2020-06-18 08:40:41 +08:00
Jinzhu a954d772d7 Support customize gorm field type 2020-06-06 10:47:32 +08:00
Jinzhu d50879cc28 Add field permission test 2020-06-05 19:18:22 +08:00
Jinzhu b32658358c Fix can't scan null value into normal data types 2020-06-03 09:00:20 +08:00
Jinzhu 94685d1024 Fix can't scan null value into normal data types 2020-06-02 23:30:26 +08:00
Jinzhu 5790ba9ef4 Fix package path 2020-06-02 09:25:55 +08:00
Jinzhu e986371a42 Rename package name 2020-06-02 09:18:01 +08:00
Jinzhu 1559fe24e5 Add more updates test 2020-06-01 19:41:33 +08:00
Jinzhu 6d555ef8d5 Test embedded struct 2020-05-31 14:18:07 +08:00
Jinzhu c291c2f42c Add Scanner, Valuer tests 2020-05-30 21:05:27 +08:00
Jinzhu abae7f71c5 Test non std primary key and default value 2020-05-30 16:03:27 +08:00
Jinzhu 6f4602af11 Fix mysql tests 2020-05-29 23:38:03 +08:00
Jinzhu 55074213bc Add SoftDelete support 2020-05-29 07:35:45 +08:00
Jinzhu 68a7a8207a Test HasOne Association 2020-05-24 23:07:42 +08:00
Jinzhu 91a695893c Test Association For BelongsTo 2020-05-24 18:33:15 +08:00
Jinzhu 56ca9a87e0 Add permission check when create associations 2020-04-16 10:29:18 +08:00
Jinzhu e1bcca6b33 Compatible with tag PRIMARY_KEY 2020-04-12 13:16:15 +08:00
Jinzhu a46d48ccb3 Add tests for controlling field permission with tag 2020-04-08 08:32:28 +08:00
Jinzhu 29cd35219f Add creatable, updatable, readable permission 2020-04-08 08:15:00 +08:00