2.2.3 or .4 JoinTable - specify a table name underscore issue

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view

2.2.3 or .4 JoinTable - specify a table name underscore issue

Jeff Scadden
When using 2.2.3 or 2.2.4 the name attribute of the joinTable always uses underscores.

class Patient {
    String firstName

    static hasMany = [
            emails: Email

    static mapping = {
        firstName column:'worksEvenHere'
        emails joinTable: [name: 'thisDoesntWork', column: 'thisWorks', key: 'worksHere']

Hibernate will look for a table named this_doesnt_work instead of thisDoesntWork.
Any Ideas?
Reply | Threaded
Open this post in threaded view

Non-domain Grails


Looking for advice:


We’ve been using Groovy for a number of years for infrastructure-level scripting, database tools, and Groovlets. Now we need to build a fully-featured web application, and we want to leverage Groovy in doing so. In our case, there is little need for domain objects, as most of the operations will be service calls. We need to build web pages, control URL routing, and support Ajax, but I may not have to code a single domain class that results in a CRUD or report page.


Has anyone ever done this?


·         The domain is pre-existent and mostly read only.

·         All operations will be performed by services, either to retrieve data (JSON) or to call a stored procedure or direct SQL updates.

·         I need Ajax support, but that also needs to call a service method that handles a complex query for autocomplete.

·         If I’m looking at the code for a web page (gsp, or the like), I need to be able to see readily what code is called when I click on something.

·         Screen building will be somewhat dynamic, with “click on parent to see children, click on a child to see details” and so forth.


We are dealing with a large data warehouse for which we will provide views, materialized or otherwise, for all display and operations, you won’t be able to update a domain object.


Is Grails the best way to do this? I know that there are many ways to do it, but I would be interested in the experiences of those who have encountered the same sort of project.


Brian Gardner

This communication is for informational purposes only. It is not intended as an offer or solicitation for the purchase or sale of any financial instrument or as an official confirmation of any transaction. All market prices, data and other information are not warranted as to completeness or accuracy and are subject to change without notice. Any comments or statements made herein do not necessarily reflect those of JPMorgan Chase & Co., its subsidiaries and affiliates. This transmission may contain information that is proprietary, privileged, confidential and/or exempt from disclosure under applicable law. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein (including any reliance thereon) is STRICTLY PROHIBITED. Although this transmission and any attachments are believed to be free of any virus or other defect that might affect any computer system into which it is received and opened, it is the responsibility of the recipient to ensure that it is virus free and no responsibility is accepted by JPMorgan Chase & Co., its subsidiaries and affiliates, as applicable, for any loss or damage arising in any way from its use. If you received this transmission in error, please immediately contact the sender and destroy the material in its entirety, whether in electronic or hard copy format. Thank you. Please refer to http://www.jpmorgan.com/pages/disclosures for disclosures relating to European legal entities.