func (box *EventBox) Update(object *Event) error {
	return box.Box.Update(object)
}
Update synchronously updates a single object.
As opposed to Put, Update will fail if an object with the same ID is not found in the database.
package iot
import (
	"errors"
	"github.com/google/flatbuffers/go"
	"github.com/objectbox/objectbox-go/objectbox"
	"github.com/objectbox/objectbox-go/objectbox/fbutils"
)
type event_EntityInfo struct {
	objectbox.Entity
	Uid uint64
}
var EventBinding = event_EntityInfo{
	Entity: objectbox.Entity{
		Id: 1,
	},
	Uid: 1468539308767086854,
}
var Event_ = struct {
	Id      *objectbox.PropertyUint64
	Device  *objectbox.PropertyString
	Date    *objectbox.PropertyInt64
	Uid     *objectbox.PropertyString
	Picture *objectbox.PropertyByteVector
}{
	Id: &objectbox.PropertyUint64{
		BaseProperty: &objectbox.BaseProperty{
			Id:     1,
			Entity: &EventBinding.Entity,
		},
	},
	Device: &objectbox.PropertyString{
		BaseProperty: &objectbox.BaseProperty{
			Id:     2,
			Entity: &EventBinding.Entity,
		},
	},
	Date: &objectbox.PropertyInt64{
		BaseProperty: &objectbox.BaseProperty{
			Id:     3,
			Entity: &EventBinding.Entity,
		},
	},
	Uid: &objectbox.PropertyString{
		BaseProperty: &objectbox.BaseProperty{
			Id:     4,
			Entity: &EventBinding.Entity,
		},
	},
	Picture: &objectbox.PropertyByteVector{
		BaseProperty: &objectbox.BaseProperty{
			Id:     5,
			Entity: &EventBinding.Entity,
		},
	},
}
func (event_EntityInfo) GeneratorVersion() int {
	return 6
}
func (event_EntityInfo) AddToModel(model *objectbox.Model) {
	model.Entity("Event", 1, 1468539308767086854)
	model.Property("Id", 6, 1, 3098166604415018001)
	model.PropertyFlags(1)
	model.Property("Device", 9, 2, 1213411729427304641)
	model.Property("Date", 10, 3, 5907655274386702697)
	model.Property("Uid", 9, 4, 472416569173577818)
	model.PropertyFlags(2080)
	model.PropertyIndex(1, 3297791712577314158)
	model.Property("Picture", 23, 5, 6024563395733984005)
	model.EntityLastPropertyId(5, 6024563395733984005)
}
func (event_EntityInfo) GetId(object interface{}) (uint64, error) {
	return object.(*Event).Id, nil
}
func (event_EntityInfo) SetId(object interface{}, id uint64) error {
	object.(*Event).Id = id
	return nil
}
func (event_EntityInfo) PutRelated(ob *objectbox.ObjectBox, object interface{}, id uint64) error {
	return nil
}
func (event_EntityInfo) Flatten(object interface{}, fbb *flatbuffers.Builder, id uint64) error {
	obj := object.(*Event)
	var offsetDevice = fbutils.CreateStringOffset(fbb, obj.Device)
	var offsetUid = fbutils.CreateStringOffset(fbb, obj.Uid)
	var offsetPicture = fbutils.CreateByteVectorOffset(fbb, obj.Picture)
	fbb.StartObject(5)
	fbutils.SetUint64Slot(fbb, 0, id)
	fbutils.SetUOffsetTSlot(fbb, 3, offsetUid)
	fbutils.SetUOffsetTSlot(fbb, 1, offsetDevice)
	fbutils.SetInt64Slot(fbb, 2, obj.Date)
	fbutils.SetUOffsetTSlot(fbb, 4, offsetPicture)
	return nil
}
func (event_EntityInfo) Load(ob *objectbox.ObjectBox, bytes []byte) (interface{}, error) {
	if len(bytes) == 0 {  
		return nil, errors.New("can't deserialize an object of type 'Event' - no data received")
	}
	var table = &flatbuffers.Table{
		Bytes: bytes,
		Pos:   flatbuffers.GetUOffsetT(bytes),
	}
	var propId = table.GetUint64Slot(4, 0)
	return &Event{
		Id:      propId,
		Uid:     fbutils.GetStringSlot(table, 10),
		Device:  fbutils.GetStringSlot(table, 6),
		Date:    fbutils.GetInt64Slot(table, 8),
		Picture: fbutils.GetByteVectorSlot(table, 12),
	}, nil
}
func (event_EntityInfo) MakeSlice(capacity int) interface{} {
	return make([]*Event, 0, capacity)
}
func (event_EntityInfo) AppendToSlice(slice interface{}, object interface{}) interface{} {
	if object == nil {
		return append(slice.([]*Event), nil)
	}
	return append(slice.([]*Event), object.(*Event))
}
type EventBox struct {
	*objectbox.Box
}
func BoxForEvent(ob *objectbox.ObjectBox) *EventBox {
	return &EventBox{
		Box: ob.InternalBox(1),
	}
}
func (box *EventBox) Put(object *Event) (uint64, error) {
	return box.Box.Put(object)
}
func (box *EventBox) Insert(object *Event) (uint64, error) {
	return box.Box.Insert(object)
}