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

In 1.6, any field in a mapped object named "language" will fail to map if it is a type other than String [DATAMONGO-1053] #1974

spring-projects-issues opened this issue Sep 12, 2014 · 1 comment
in: mapping Mapping and conversion infrastructure type: bug A general bug


Copy link

@spring-projects-issues spring-projects-issues commented Sep 12, 2014

Andrew opened DATAMONGO-1053 and commented

In 1.6, there is now a restriction that a field named "language" must be a String. So, in 1.5, the following will map but will not map in 1.6:

package com.instantly.pipeline.engine.model;

import javax.persistence.Id;

public class Foobar {

    String id;
    private Number language;

    public String getId() {
        return id;

    public void setId(String id) { = id;

    public Number getLanguage() {
        return language;

    public void setLanguage(Number language) {
        this.language = language;

Affects: 1.6 M1 (Evans)

Issue Links:

  • DATAMONGO-1049 Reserved field name 'language' causes trouble
    ("depends on")

Referenced from: pull request #228

Backported to: 1.6.1 (Evans SR1)

1 votes, 3 watchers

Copy link

@spring-projects-issues spring-projects-issues commented Sep 18, 2014

Christoph Strobl commented

Thanks for reporting! We'll introduce isExplicitLanguageProperty() in DATAMONGO-1049 which can then also use for type checking in BasicMongoPersistentEntity#potentiallyAssertLanguageType.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
in: mapping Mapping and conversion infrastructure type: bug A general bug
None yet

No branches or pull requests

2 participants