New posts for Spring and Hibernate

This commit is contained in:
2026-11-06 01:05:27 +05:30
parent 51913ad9d4
commit dc13293046
136 changed files with 5268 additions and 0 deletions
@@ -0,0 +1,28 @@
# @Context cycle tracking: it works for a bean target and cannot work for a record target
bean target + @Context CycleContext : ann.manager.manager is ann? true
record target + the same @Context : java.lang.StackOverflowError
--- why: the generated record mapping recurses BEFORE it can call the constructor ---
public Probes.EmployeeRecord toRecord(Probes.Employee employee, CycleContext context) {
Probes.EmployeeRecord target = context.lookup( employee, Probes.EmployeeRecord.class );
if ( target != null ) {
return target;
}
if ( employee == null ) {
return null;
}
String name = null;
Probes.EmployeeRecord manager = null;
name = employee.name;
manager = toRecord( employee.manager, context );
Probes.EmployeeRecord employeeRecord = new Probes.EmployeeRecord( name, manager );
context.remember( employee, employeeRecord );
return employeeRecord;
}