Silent failure to update schema with new entities when entity column definition is wrong

Description

Scenario:

Parent entity A contains an embedded entity B which has the following field:

@Column(nullable = true, scale = 3, precision = 6)
public BigDecimal test;

Expected behaviour: initialization should fail completely, yet initialization is successful without any errors. In this case whole parent entity A is not created at all. Any child entity referencing parent entity A is created with proper ID fields but with them set to null.

 

If having the definition inside the parent entity A, then parent entity is created successfully, but without the field, again, without any error. Functionality wise, this should be a initialization failure at startup since the application will fail anyway when first usage.

Environment

None

Activity

Show:
Sergiu Hlihor
September 17, 2019, 11:53 PM

@Hibernate community

Whole Hibernate Core is riddled with those initialization issues. Is this ever going to be fixed? Those issues are rediscovered over and over again in debugging when trying to figure out why entities are not there and lead to a huge amount of time lost.

Assignee

Unassigned

Reporter

Sergiu Hlihor

Fix versions

None

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Critical
Configure