-
Notifications
You must be signed in to change notification settings - Fork 39
Open
Description
Description
A Cucumber step verifying the table content fails when an entity contains a @ManyToOne relationship marked as read-only (insertable = false, updatable = false).
Environment
- Current Version: 2.3.10 (Failing)
- Java/Hibernate context: JPA Entity with Lazy fetching.
Entity Configuration
The issue occurs on entities with the following mapping:
@Entity
public class MyEntity {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
// ... other fields
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "my_other_object_id", insertable = false, updatable = false)
private MyOtherObject myOtherObject;
}
Steps to Reproduce
Define a .feature file that checks for a null value in the relationship column.
Run the test using version 2.3.10.
Cucumber snippet:
And the my_entity table contains exactly:
| id | ... | myOtherObject |
| 1 | ... | {{null}} |
Actual Behavior
If I don't specify the column, it tells me that the two objects are not the same size.
And when I specify {{null}}, it tells me that the column is not null.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels