func (tSDate_EntityInfo) MakeSlice(capacity int) interface{} {
	return make([]*TSDate, 0, capacity)
}
MakeSlice is called by ObjectBox to construct a new slice to hold the read objects
package model
import (
	"errors"
	"github.com/google/flatbuffers/go"
	"github.com/objectbox/objectbox-go/objectbox"
	"github.com/objectbox/objectbox-go/objectbox/fbutils"
)
type tSDate_EntityInfo struct {
	objectbox.Entity
	Uid uint64
}
var TSDateBinding = tSDate_EntityInfo{
	Entity: objectbox.Entity{
		Id: 6,
	},
	Uid: 2767047163049667536,
}
var TSDate_ = struct {
	Id   *objectbox.PropertyUint64
	Time *objectbox.PropertyInt64
}{
	Id: &objectbox.PropertyUint64{
		BaseProperty: &objectbox.BaseProperty{
			Id:     1,
			Entity: &TSDateBinding.Entity,
		},
	},
	Time: &objectbox.PropertyInt64{
		BaseProperty: &objectbox.BaseProperty{
			Id:     2,
			Entity: &TSDateBinding.Entity,
		},
	},
}
func (tSDate_EntityInfo) GeneratorVersion() int {
	return 6
}
func (tSDate_EntityInfo) AddToModel(model *objectbox.Model) {
	model.Entity("TSDate", 6, 2767047163049667536)
	model.Property("Id", 6, 1, 1462677146136716215)
	model.PropertyFlags(1)
	model.Property("Time", 10, 2, 180851766275559029)
	model.PropertyFlags(16384)
	model.EntityLastPropertyId(2, 180851766275559029)
}
func (tSDate_EntityInfo) GetId(object interface{}) (uint64, error) {
	return object.(*TSDate).Id, nil
}
func (tSDate_EntityInfo) SetId(object interface{}, id uint64) error {
	object.(*TSDate).Id = id
	return nil
}
func (tSDate_EntityInfo) PutRelated(ob *objectbox.ObjectBox, object interface{}, id uint64) error {
	return nil
}
func (tSDate_EntityInfo) Flatten(object interface{}, fbb *flatbuffers.Builder, id uint64) error {
	obj := object.(*TSDate)
	var propTime int64
	{
		var err error
		propTime, err = objectbox.TimeInt64ConvertToDatabaseValue(obj.Time)
		if err != nil {
			return errors.New("converter objectbox.TimeInt64ConvertToDatabaseValue() failed on TSDate.Time: " + err.Error())
		}
	}
	fbb.StartObject(2)
	fbutils.SetUint64Slot(fbb, 0, id)
	fbutils.SetInt64Slot(fbb, 1, propTime)
	return nil
}
func (tSDate_EntityInfo) Load(ob *objectbox.ObjectBox, bytes []byte) (interface{}, error) {
	if len(bytes) == 0 {  
		return nil, errors.New("can't deserialize an object of type 'TSDate' - no data received")
	}
	var table = &flatbuffers.Table{
		Bytes: bytes,
		Pos:   flatbuffers.GetUOffsetT(bytes),
	}
	var propId = table.GetUint64Slot(4, 0)
	propTime, err := objectbox.TimeInt64ConvertToEntityProperty(fbutils.GetInt64Slot(table, 6))
	if err != nil {
		return nil, errors.New("converter objectbox.TimeInt64ConvertToEntityProperty() failed on TSDate.Time: " + err.Error())
	}
	return &TSDate{
		Id:   propId,
		Time: propTime,
	}, nil
}