title: Gorm retrive different UUID value from that in the database - MSSQL
body: <p>Model</p>
  <pre><code>type Invoice struct {
      ID                uint           `gorm:&quot;primarykey&quot; json:&quot;-&quot;`
      UID               uuid.UUID      `gorm:&quot;type:UNIQUEIDENTIFIER;uniqueIndex:idx_UniqueID&quot; json:&quot;id&quot;`
  }
  </code></pre>
  <p>On database value dispalayed as flowws</p>
  <p><img src="https://user-images.githubusercontent.com/47332486/173232334-94a64bf0-b40d-49df-a2ec-c80fa66ebd73.png" alt="image" /></p>
  <p>But When I retriving data from database I get different values from those in db
  <img src="https://user-images.githubusercontent.com/47332486/173232361-607261e1-3d69-42bc-8e97-2bdaf4547261.png" alt="image" /></p>
  <p>Is there something wrong on model creation?</p>
  <p>handler</p>
  <pre><code>func GetInvoices(c *fiber.Ctx) error {
      invoices := []responses.Invoice{}
      var invoicesCount int64
  
      page, pageSize, searchString, orderBy := handles.Pages(c)
      switch orderBy {
      case &quot;customer_name&quot;:
          orderBy = &quot;CustomerName&quot;
      case &quot;currency_id&quot;:
          orderBy = &quot;ForeignCurrenycID&quot;
      default:
          orderBy = &quot;ID&quot;
      }
  
      if err := database.DB.Model(&amp;models.Invoice{}).Select(&quot;ID&quot;).Where(&quot;InvNumber like ? or CustomerName like ? or Tax_Number like ? or Registration like ? or Description like ?&quot;, searchString, searchString, searchString, searchString, searchString).Count(&amp;invoicesCount).Error; err != nil {
          logs.ErrorLogger.Println(err.Error())
          return c.Status(400).JSON(fiber.Map{&quot;msg&quot;: err.Error()})
      }
  
      if err := database.DB.Scopes(handles.Paginate(c)).Order(orderBy).Find(&amp;invoices).Where(&quot;InvNumber like ? or CustomerName like ? or Tax_Number like ? or Registration like ? or Description like ?&quot;, searchString, searchString, searchString, searchString, searchString).Error; err != nil {
          logs.ErrorLogger.Println(err.Error())
          return c.Status(400).JSON(fiber.Map{&quot;msg&quot;: err.Error()})
      }
      for _, inv := range invoices{
          fmt.Println(inv.UID)
      }
      totalPages := math.Ceil(float64(invoicesCount) / float64(pageSize))
  
      return c.Status(200).JSON(fiber.Map{&quot;page&quot;: page, &quot;pageSize&quot;: pageSize, &quot;totalPages&quot;: totalPages, &quot;totalItems&quot;: invoicesCount, &quot;data&quot;: &amp;invoices})
  }
  </code></pre>