Files
spring-data-relational/spring-data-jdbc/src
Mark Paluch 9cd8fc16b3 DATAJDBC-508 - Add support for @Value in persistence constructors.
We now evaluate @Value annotations in persistence constructors to compute values when creating object instances. AtValue can be used to materialize values for e.g. transient properties. Root properties map to the ResultSet from which an object gets materialized.

class WithAtValue {

	private final @Id Long id;
	private final @Transient String computed;

	public WithAtValue(Long id,
			@Value("#root.first_name") String computed) { // obtain value from first_name column
		this.id = id;
			this.computed = computed;
		}
	}
2020-09-22 11:48:56 +02:00
..