Sujet : Re: VMS x86-64 database server
De : arne (at) *nospam* vajhoej.dk (Arne Vajhøj)
Groupes : comp.os.vmsDate : 12. Jul 2025, 00:43:59
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <104s7jv$1ohh3$1@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
User-Agent : Mozilla Thunderbird
On 7/11/2025 7:35 PM, Lawrence D'Oliveiro wrote:
On Thu, 10 Jul 2025 20:29:56 -0400, Arne Vajhøj wrote:
You can save a lot of code by using ORM.
>
Example (Groovy and JPA):
>
jpadata = em.createQuery("SELECT DISTINCT o FROM OrdersJPA AS o JOIN
FETCH o.orderLines ol", OrdersJPA.class).getResultList()
>
Gives you a list of order objects that each has a list of order lines
objects.
I thought the whole point of an ORM was to get away from having to hand-
construct SQL queries. And yet you have done exactly that.
That is not SQL but HQL.
:-)
No. ORM's either comes with its own query language or allow
usage of SQL or have an equivalent fluent API or support more
than one of those.
The main point of ORM is to avoid boilerplate code like
iterating and result sets and stuff them into the object data
structure.
Some ORM's operate with a dirty concept and automatically
save changed objects.
Some ORM's provide identical syntax for doing things even
though the underlying databases have different SQL syntax for
it, which help making the application more portable.
Arne