[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-1476) Table.qualify does not handle dialect diferences

Stefaan Van Mieghem (JIRA) noreply at atlassian.com
Thu Nov 30 10:15:04 EST 2006


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1476?page=comments#action_25508 ] 

Stefaan Van Mieghem commented on HHH-1476:
------------------------------------------

You can add this case:
Informix database:owner.table

catalog separator = ':' (colon)
schema separator = '.' (dot)

Using table="<database>:<table>" in the mapping works, but binds your hibernate mapping to a specific database.

> Table.qualify does not handle dialect diferences
> ------------------------------------------------
>
>          Key: HHH-1476
>          URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1476
>      Project: Hibernate3
>         Type: Bug

>   Components: core
>  Environment: Hibernate 3.1.2
> SQL Server 2000
>     Reporter: Justin Kolb

>
>
> The fix for HHH-699 caused me to discover that Hibernate isn't handling qualifying table names properly. It can be inferred from HHH-699 that not all databases are similar in this respect so I think this should be added to the dialect handling. From my short research I have the following 3 cases:
> SQL Server: database.owner.table
> MySQL: database.table (no schemas it seems)
> Most others: catalog.schema.table
> SQL Server also allows for "database..table" since it does not have schemas but does allow you to write queries that cross databases similar to how you can cross schemas in other database servers.
> Testing on Postgres though I determined that it does not allow "catalog..table" and will only accept "catalog.schema.table", so it dos not match up with SQL Server in this respect. If you write "catalog.table" it thinks you are trying to use a schema so it does not match up with MySQL in this respect.
> So right now only MySQL and SQL Server are the non standard compliant databases. Before 3.1 beta 1, SQL Server was handled correctly; then after that only MySQL was handled correctly.
> I'm not sure how much work it would take to make this change.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira




More information about the hibernate-issues mailing list