>> I'm seeing the laziness issue.
> 
> Not sure what you mean.

Me neither anymore :-(
(too much snippage)

>> Jokes aside, the more interesting question (for me) is whether the 
>> relational links between Records should really be handled differently 
>> than those between pojos.
> 
> Records: 1-1 mapping between SQL and Java (like ActiveRecords)
> POJOs: Arbitrary user code
> 
> It's the old story of the ORM impedance mismatch, to try to make them work 
> the same way.

Thinking on a tangent, not really related to Jooq:
I think the mismatch should be addressed by setting up maps from keys to 
records, rebuilding the DB's concept of an index on the Java side. Getters and 
setters would go through the maps and the mismatch would go away (at least the 
link-vs-join mismatch, there are others).

>>> two consecutive executions of the same / a similar query would have 
>>> to produce identical records.
>>
>> Only if you have a guarantee that identity inside the RDBMS maps to 
>> identity inside the JVM.
>> Which, of course, it doesn't. Not even with a fully normalized schema 
>> where every table has a PK. Does Jooq even want to guarantee this kind 
>> of equivalence, across transactions? DB connections/sessions? JVMs?
>
> jOOQ does not care about what you called object identity.

1) Object identity is a well-established concept, not my personal definition. 
In Java, it is defined by ==.
2) Object identity played a role in some design decisions you were considering, 
namely how to find out whether a record is already represented on the Java side 
(namely in situations where there's no unique key available). I'm a bit fuzzy 
about the details, but yes object identity can be a useful fallback, though in 
very limited circumstances. (Also, Oracle's ROWID does map cleanly to object 
identity. Many but not all databases have an equivalent concept, relational 
theory be damned.)

> jOOQ will always treat record equality according to what SQL
> understands by row value expression equality. The concept of
> identity is not involved in this discussion.

If that's Jooq's design choice - okay.

Regards,
Jo

-- 
You received this message because you are subscribed to the Google Groups "jOOQ 
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to