Overlapping table names in the database--where to report the issue?

View: New views
4 Messages — Rating Filter:   Alert me  

Overlapping table names in the database--where to report the issue?

by Jay Slater :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

class Course{
}

class Person{
     static hasMany = [courses: Course]
}

class PersonCourse{
}

In Grails 1.1 against an Oracle database, the above code will make a single table called PERSON_COURSE. If there are foreign key constraints, the table will have all of them (which led, in our case, to some mutually exclusive constraints and about half a day of head-scratching until we figured it out). Where should I report this?

Re: Overlapping table names in the database--where to report the issue?

by Robert Fischer :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

What's the specific problem that you would report?

You can change the default join table with:
http://grails.org/doc/1.1.x/ref/Database%20Mapping/joinTable.html

~~ Robert.

Jay Slater wrote:

> class Course{
> }
>
> class Person{
>      static hasMany = [courses: Course]
> }
>
> class PersonCourse{
> }
>
> In Grails 1.1 against an Oracle database, the above code will make a
> single table called PERSON_COURSE. If there are foreign key constraints,
> the table will have all of them (which led, in our case, to some
> mutually exclusive constraints and about half a day of head-scratching
> until we figured it out). Where should I report this?

--
~~ Robert Fischer, Smokejumper IT Consulting.
Enfranchised Mind Blog http://EnfranchisedMind.com/blog

Check out my book, "Grails Persistence with GORM and GSQL"!
http://www.smokejumperit.com/redirect.html

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: Overlapping table names in the database--where to report the issue?

by Jay Slater :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

It can be changed (the design actually ended up changing to something more sensible as a result of the problem, although we considered changing the join table), but the problem is that some component in the Grails stack allowed us to have overlapping table names without giving us any warning. Since the table it ended up constructing was, in our case, impossible to populate (due to the presence of mutually exclusive foreign key constraints) I feel like it's the kind of thing that ought to throw an exception.

On Thu, Jul 2, 2009 at 3:32 PM, Robert Fischer <robert.fischer@...> wrote:
What's the specific problem that you would report?

You can change the default join table with: http://grails.org/doc/1.1.x/ref/Database%20Mapping/joinTable.html

~~ Robert.


Jay Slater wrote:
class Course{
}

class Person{
    static hasMany = [courses: Course]
}

class PersonCourse{
}

In Grails 1.1 against an Oracle database, the above code will make a single table called PERSON_COURSE. If there are foreign key constraints, the table will have all of them (which led, in our case, to some mutually exclusive constraints and about half a day of head-scratching until we figured it out). Where should I report this?

--
~~ Robert Fischer, Smokejumper IT Consulting.
Enfranchised Mind Blog http://EnfranchisedMind.com/blog

Check out my book, "Grails Persistence with GORM and GSQL"!
http://www.smokejumperit.com/redirect.html

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

  http://xircles.codehaus.org/manage_email




Re: Overlapping table names in the database--where to report the issue?

by Robert Fischer :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I'd report this to the Hibernate JIRA, then.  You can report it to Grails, and there might get to be
a hack around it...

~~ Robert.

Jay Slater wrote:

> It can be changed (the design actually ended up changing to something
> more sensible as a result of the problem, although we considered
> changing the join table), but the problem is that some component in the
> Grails stack allowed us to have overlapping table names without giving
> us any warning. Since the table it ended up constructing was, in our
> case, impossible to populate (due to the presence of mutually exclusive
> foreign key constraints) I feel like it's the kind of thing that ought
> to throw an exception.
>
> On Thu, Jul 2, 2009 at 3:32 PM, Robert Fischer
> <robert.fischer@...
> <mailto:robert.fischer@...>> wrote:
>
>     What's the specific problem that you would report?
>
>     You can change the default join table with:
>     http://grails.org/doc/1.1.x/ref/Database%20Mapping/joinTable.html
>
>     ~~ Robert.
>
>
>     Jay Slater wrote:
>
>         class Course{
>         }
>
>         class Person{
>             static hasMany = [courses: Course]
>         }
>
>         class PersonCourse{
>         }
>
>         In Grails 1.1 against an Oracle database, the above code will
>         make a single table called PERSON_COURSE. If there are foreign
>         key constraints, the table will have all of them (which led, in
>         our case, to some mutually exclusive constraints and about half
>         a day of head-scratching until we figured it out). Where should
>         I report this?
>
>
>     --
>     ~~ Robert Fischer, Smokejumper IT Consulting.
>     Enfranchised Mind Blog http://EnfranchisedMind.com/blog
>
>     Check out my book, "Grails Persistence with GORM and GSQL"!
>     http://www.smokejumperit.com/redirect.html
>
>     ---------------------------------------------------------------------
>     To unsubscribe from this list, please visit:
>
>       http://xircles.codehaus.org/manage_email
>
>
>

--
~~ Robert Fischer, Smokejumper IT Consulting.
Enfranchised Mind Blog http://EnfranchisedMind.com/blog

Check out my book, "Grails Persistence with GORM and GSQL"!
http://www.smokejumperit.com/redirect.html

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email