Skip to content

Ensure final fields of immutable entities are persisted correctly. #1763

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

Closed
spring-projects-issues opened this issue Feb 25, 2019 · 1 comment
Assignees
Labels
in: core Issues in core support in: ogm Object Graph Mapping (Legacy) type: enhancement A general enhancement

Comments

@spring-projects-issues
Copy link

Michael Simons opened DATAGRAPH-1201 and commented

See attached reproducer.

@NodeEntity
public class Blub {
	@Id
	@GeneratedValue
	private Long id;

	private final String name;

	public Blub(String name) {
		this.name = name;
	}

	public String getName() {
		return name;
	}
}

fails to be save correctly, name is always null.

If you remove the final, than everything is ok.


Affects: 5.1.5 (Lovelace SR5)

Attachments:

@spring-projects-issues spring-projects-issues added type: enhancement A general enhancement in: core Issues in core support in: ogm Object Graph Mapping (Legacy) labels Dec 31, 2020
@michael-simons
Copy link
Collaborator

This has been fixed with neo4j/neo4j-ogm@6475ae8, released as OGM 3.1.14 which was part of SDN 5.1.11 for the first time.

@michael-simons michael-simons changed the title Entities with immutable fields are not save correctly. [DATAGRAPH-1201] Ensure final fields of immutable entities are persisted correctly. Jan 15, 2021
michael-simons added a commit that referenced this issue Jan 15, 2021
…rectly.

The underlying issue has been fixed with Neo4j-OGM 3.1.14, so all that
was left todo was enabling the existing test.

This closes #1763.
michael-simons added a commit that referenced this issue Jan 15, 2021
…rectly.

The underlying issue has been fixed with Neo4j-OGM 3.1.14, so all that
was left todo was enabling the existing test.

This closes #1763.
michael-simons added a commit that referenced this issue Jan 15, 2021
…rectly.

The underlying issue has been fixed with Neo4j-OGM 3.1.14, so all that
was left todo was enabling the existing test.

This closes #1763.
@michael-simons michael-simons added this to the 5.2.13 (Moore SR13) milestone Jan 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core support in: ogm Object Graph Mapping (Legacy) type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

3 participants