Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>A couple of things I can see.</p> <p>I don't think <code>fetch: 'eager'</code> is a valid fetch type: <a href="http://grails.org/doc/latest/ref/Database%20Mapping/fetch.html" rel="nofollow">see Fetch</a></p> <p>what you might want is: <code>lazy: false</code> , <a href="http://grails.org/doc/latest/guide/single.html#fetching" rel="nofollow">see Fetching</a></p> <p>Now also I think you might want a join and not selects, so maybe (this I can't guarantee is totally correct but I hope puts u on the right track):</p> <pre><code>inventoryItems column: 'ITEM_ID', ignoreNotFound: true, fetch: 'join' </code></pre> <p>and in the InventoryItem mapping:</p> <pre><code>invItem column: 'ITEM_ID' </code></pre> <p>Now maybe turn on Hibernate logging to see what is going on at the SQL level</p> <p>In Config.groovy find the log4j setup and add:</p> <pre><code>trace 'org.hibernate.SQL' </code></pre> <p>Also see <a href="http://grails.org/FAQ#Q%3a%20How%20can%20I%20turn%20on%20logging%20for%20hibernate%20in%20order%20to%20see%20SQL%20statements,%20input%20parameters%20and%20output%20results?" rel="nofollow">FAQ</a></p> <p>on top of that you turn on SQL logging on a <a href="http://grails.org/doc/latest/guide/conf.html#dataSource" rel="nofollow">per datasource</a> setting </p> <p>...or even try the <a href="http://www.grails.org/p6spy+plugin" rel="nofollow">P6 plugin</a> if necessary, that should give you more of a hint as to what SQL is being generated</p> <p>Sorry for the reference overkill</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload