Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestMany2ManyAssociation (0.22 sec)

  1. tests/associations_many2many_test.go

    package tests_test
    
    import (
    	"fmt"
    	"sync"
    	"testing"
    
    	"gorm.io/gorm"
    	"gorm.io/gorm/clause"
    	. "gorm.io/gorm/utils/tests"
    )
    
    func TestMany2ManyAssociation(t *testing.T) {
    	user := *GetUser("many2many", Config{Languages: 2})
    
    	if err := DB.Create(&user).Error; err != nil {
    		t.Fatalf("errors happened when create: %v", err)
    	}
    
    	CheckUser(t, user, user)
    
    	// Find
    	var user2 User
    Go
    - Registered: Sun Apr 21 09:35:09 GMT 2024
    - Last Modified: Sat Jun 10 13:05:19 GMT 2023
    - 13.2K bytes
    - Viewed (0)
Back to top