func (t *Theme) MergeImport(i interface{}) (bool, error) {
	existing := i.(*Theme)
	if t.ID != existing.ID {
		return false, errors.New("IDs don't match")
	}
	if t.Imported.IsZero() || existing.Imported.IsZero() {
		return false, errors.New("not an import")
	}
	if !t.Created.Equal(existing.Created) {
		return false, errors.New("Created timestamps don't match")
	}
	t.Rev = existing.Rev
	if t.Modified.After(existing.Modified) {
		// The new version is newer than the existing one, so update
		return true, nil
	}
	// The new version is older, so we need to use the version we just read
	t.Name = existing.Name
	t.Description = existing.Description
	t.Models = existing.Models
	t.Attachments = existing.Attachments
	t.Files = existing.Files
	t.ModelSequence = existing.ModelSequence
	t.Modified = existing.Modified
	t.Imported = existing.Imported
	return false, nil
}
// MergeImport attempts to merge i into t and returns true if a merge occurred,
// or false if no merge was necessary.
MergeImport attempts to merge i into t and returns true if a merge occurred,
or false if no merge was necessary.
// MergeImport attempts to merge i into t and returns true if a merge occurred // or false if no merge was necessary .
func (t *Theme) MergeImport(i interface{}) (bool, error) {
	existing := i.(*Theme)
	if t.ID != existing.ID {
		return false, errors.New("IDs don't match")
	}
	if t.Imported.IsZero() || existing.Imported.IsZero() {
		return false, errors.New("not an import")
	}
	if !t.Created.Equal(existing.Created) {
		return false, errors.New("Created timestamps don't match")
	}
	t.Rev = existing.Rev
	if t.Modified.After(existing.Modified) {
		return true, nil
	}
	t.Name = existing.Name
	t.Description = existing.Description
	t.Models = existing.Models
	t.Attachments = existing.Attachments
	t.Files = existing.Files
	t.ModelSequence = existing.ModelSequence
	t.Modified = existing.Modified
	t.Imported = existing.Imported
	return false, nil
}
func ( t * Theme ) MergeImport ( i interface { } ) ( bool , error ) { existing := i . ( * Theme ) if t . ID != existing . ID { return false , errors . New ( " " ) } if t . Imported . IsZero ( ) || existing . Imported . IsZero ( ) { return false , errors . New ( " " ) } if ! t . Created . Equal ( existing . Created ) { return false , errors . New ( " " ) } t . Rev = existing . Rev if t . Modified . After ( existing . Modified ) { return true , nil } t . Name = existing . Name t . Description = existing . Description t . Models = existing . Models t . Attachments = existing . Attachments t . Files = existing . Files t . ModelSequence = existing . ModelSequence t . Modified = existing . Modified t . Imported = existing . Imported return false , nil }
MergeImport attempts to merge i into t and returns true if a merge occurred,
or false if no merge was necessary.
MergeImport attempts to merge i into t and returns true if a merge occurred or false if no merge was necessary .
// The new version is newer than the existing one, so update // The new version is older, so we need to use the version we just read