Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 1,794 for Has (0.13 sec)

  1. tests/associations_has_one_test.go

    }
    
    func TestPolymorphicHasOneAssociationForSlice(t *testing.T) {
    	pets := []Pet{
    		{Name: "hasone-1", Toy: Toy{Name: "toy-has-one"}},
    		{Name: "hasone-2", Toy: Toy{}},
    		{Name: "hasone-3", Toy: Toy{Name: "toy-has-one"}},
    	}
    
    	DB.Create(&pets)
    
    	// Count
    	AssertAssociationCount(t, pets, "Toy", 2, "")
    
    	// Find
    	var toys []Toy
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Thu Jan 06 07:02:53 GMT 2022
    - 6.8K bytes
    - Viewed (0)
  2. tests/update_has_many_test.go

    package tests_test
    
    import (
    	"testing"
    
    	"gorm.io/gorm"
    	. "gorm.io/gorm/utils/tests"
    )
    
    func TestUpdateHasManyAssociations(t *testing.T) {
    	user := *GetUser("update-has-many", Config{})
    
    	if err := DB.Create(&user).Error; err != nil {
    		t.Fatalf("errors happened when create: %v", err)
    	}
    
    	user.Pets = []*Pet{{Name: "pet1"}, {Name: "pet2"}}
    	if err := DB.Save(&user).Error; err != nil {
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Thu Jan 06 07:02:53 GMT 2022
    - 2K bytes
    - Viewed (0)
  3. tests/update_has_one_test.go

    	"time"
    
    	"gorm.io/gorm"
    	. "gorm.io/gorm/utils/tests"
    )
    
    func TestUpdateHasOne(t *testing.T) {
    	user := *GetUser("update-has-one", Config{})
    
    	if err := DB.Create(&user).Error; err != nil {
    		t.Fatalf("errors happened when create: %v", err)
    	}
    
    	user.Account = Account{Number: "account-has-one-association"}
    
    	if err := DB.Save(&user).Error; err != nil {
    		t.Fatalf("errors happened when update: %v", err)
    	}
    
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Thu Jul 14 06:55:54 GMT 2022
    - 3.6K bytes
    - Viewed (0)
  4. tests/associations_has_many_test.go

    	user.Pets = append(user.Pets, &pet)
    	CheckUser(t, user2, user)
    
    	AssertAssociationCount(t, user, "Pets", 3, "AfterAppend")
    
    	pets2 := []Pet{{Name: "pet-has-many-append-1-1"}, {Name: "pet-has-many-append-1-1"}}
    
    	if err := DB.Model(&user2).Association("Pets").Append(&pets2); err != nil {
    		t.Fatalf("Error happened when append pet, got %v", err)
    	}
    
    	for _, pet := range pets2 {
    		pet := pet
    		if pet.ID == 0 {
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Fri Dec 15 08:36:08 GMT 2023
    - 15.6K bytes
    - Viewed (0)
  5. utils/tests/models.go

    	"time"
    
    	"gorm.io/gorm"
    )
    
    // User has one `Account` (has one), many `Pets` (has many) and `Toys` (has many - polymorphic)
    // He works in a Company (belongs to), he has a Manager (belongs to - single-table), and also managed a Team (has many - single-table)
    // He speaks many languages (many to many) and has many friends (many to many - single-table)
    // His pet also has one Toy (has one - polymorphic)
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Fri Dec 15 08:36:08 GMT 2023
    - 2.1K bytes
    - Viewed (0)
  6. build-logic/binary-compatibility/src/test/kotlin/gradlebuild/binarycompatibility/SortAcceptedApiChangesTaskIntegrationTest.kt

                                "acceptation": "Deprecated method removed",
                                "changes": [
                                    "Method has been removed"
                                ]
                            },
    {
                                "type": "org.gradle.api.tasks.AbstractExecTask",
    Plain Text
    - Registered: Wed Apr 24 11:36:11 GMT 2024
    - Last Modified: Fri Sep 30 18:18:04 GMT 2022
    - 7.5K bytes
    - Viewed (0)
  7. .github/workflows/stale.yml

            stale-issue-message: "This issue has been automatically marked as stale because it has been open 360 days with no activity. Remove stale label or comment or this will be closed in 180 days"
            days-before-stale: 360
            days-before-close: 180
            stale-issue-label: "status:stale"
            exempt-issue-labels: 'type:feature,type:with reproduction steps,type:has pull request'
            stale-pr-label: 'status:stale'
    Others
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Tue Apr 11 02:27:05 GMT 2023
    - 972 bytes
    - Viewed (0)
  8. build-logic/binary-compatibility/src/test/kotlin/gradlebuild/binarycompatibility/AlphabeticalAcceptedApiChangesTaskIntegrationTest.kt

                                "acceptation": "Removed for Gradle 8.0",
                                "changes": [
                                    "Method has been removed"
                                ]
                            },
                            {
                                "type": "org.gradle.api.AntBuilder",
    Plain Text
    - Registered: Wed Apr 24 11:36:11 GMT 2024
    - Last Modified: Fri Sep 30 18:18:04 GMT 2022
    - 6K bytes
    - Viewed (0)
  9. okhttp/src/main/kotlin/okhttp3/WebSocketListener.kt

    import okio.ByteString
    
    abstract class WebSocketListener {
      /**
       * Invoked when a web socket has been accepted by the remote peer and may begin transmitting
       * messages.
       */
      open fun onOpen(
        webSocket: WebSocket,
        response: Response,
      ) {
      }
    
      /** Invoked when a text (type `0x1`) message has been received. */
      open fun onMessage(
        webSocket: WebSocket,
        text: String,
      ) {
      }
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2K bytes
    - Viewed (0)
  10. okhttp/src/main/kotlin/okhttp3/WebSocket.kt

     *    be transmitted until the web socket is open.
     *
     *  * **Open:** the web socket has been accepted by the remote peer and is fully operational.
     *    Messages in either direction are enqueued for immediate transmission.
     *
     *  * **Closing:** one of the peers on the web socket has initiated a graceful shutdown. The web
     *    socket will continue to transmit already-enqueued messages but will refuse to enqueue new
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.3K bytes
    - Viewed (0)
Back to top