fix generated columns in mutable columns for PostgreSQL
Fix https://github.com/go-jet/jet/issues/209.
This commit is contained in:
parent
ce3c622fa4
commit
a4191b4953
6 changed files with 20 additions and 1 deletions
15
tests/postgres/generated_test.go
Normal file
15
tests/postgres/generated_test.go
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
package postgres
|
||||
|
||||
import (
|
||||
. "github.com/go-jet/jet/v2/tests/.gentestdata/jetdb/test_generated/table"
|
||||
"github.com/stretchr/testify/require"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestMutableColumnsExcludeGeneratedColumn(t *testing.T) {
|
||||
t.Run("should not have the generated column in mutableColumns", func(t *testing.T) {
|
||||
require.Equal(t, 2, len(People.MutableColumns))
|
||||
require.Equal(t, People.PeopleName, People.MutableColumns[0])
|
||||
require.Equal(t, People.PeopleHeightCm, People.MutableColumns[1])
|
||||
})
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue