> But on the java side, wouldn't the principle of immutable POJO force you to > write things like > myNewTestBeanRecord = new TestBean( "Hello", 3000, "World", "Happy", "New", > "Year" (insert a dozen more values here > all-the-same-type-that-are-easily-inverted) )?
jOOQ 2.6 supports the java.beans.ConstructorProperties annotation, to be sure that record values are mapped to the correct constructor arguments: http://www.jooq.org/doc/2.6/manual/sql-execution/fetching/pojos/#N11C85 Adam's JIRM goes a little farther and uses Jackson annotations, such as these: @JsonCreator public TestBean( @JsonProperty("stringProp") String stringProp, @JsonProperty("longProp") long longProp, @JsonProperty("timeTS") Calendar timeTS ) { (taken from the samples here: https://github.com/agentgt/jirm) For jOOQ, a dependency on Jackson is currently not an option, though.
