Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.os.vms    |    DEC's VAX* line of computers & VMS.    |    264,096 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 262,861 of 264,096    |
|    =?UTF-8?Q?Arne_Vajh=C3=B8j?= to Lawrence D'Oliveiro    |
|    Re: VMS x86-64 database server    |
|    11 Jul 25 19:43:59    |
   
   From: arne@vajhoej.dk   
      
   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   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca