Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generates collections for abstract base classes of entities #1086

Closed
dorpsidioot opened this issue Dec 1, 2016 · 0 comments
Closed

Generates collections for abstract base classes of entities #1086

dorpsidioot opened this issue Dec 1, 2016 · 0 comments
Milestone

Comments

@dorpsidioot
Copy link

Since version 1.3.0 Morphia also generates collections for abstract baseclasses of entities.

Example base class:

@Converters(JodaDateTimeConverter.class)
@Indexes({
    @Index(fields = {@Field(value = AbstractValueSliceStorage.TIMESTAMP_FIELD), @Field(value = AbstractValueSliceStorage.SERIE_FIELD)}, options = @IndexOptions(unique = true))
})
public abstract class AbstractValueSliceStorage implements Serializable {
    private static final long serialVersionUID = 1L;
   ** code surpressed **
}

Example subclass:

@Entity(value = "runtime.value.converted", noClassnameStored = true)
public class ConvertedMinutesInHour extends AbstractValueSliceStorage {
    private static final long serialVersionUID = 1L;

}

In 1.2.1 and before only the runtime.value.converted collection is created, in 1.3.0 morphia also creates a collection named AbstractValueSliceStorage.

@evanchooly evanchooly modified the milestone: 1.3.1 Dec 5, 2016
evanchooly pushed a commit that referenced this issue Dec 7, 2016
… as the nested types for definitions.

don't create indexes when the mapped class is abstract.

fixes #1086
evanchooly pushed a commit that referenced this issue Dec 8, 2016
… as the nested types for definitions.

don't create indexes when the mapped class is abstract.

fixes #1086

(cherry picked from commit a3f5b86)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants