You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@juddi.apache.org by "Kurt Stam (JIRA)" <ju...@ws.apache.org> on 2008/09/10 16:54:45 UTC

[jira] Created: (JUDDI-136) How to deal with a table prefix (JUDDI_) when using JPA

How to deal with a table prefix (JUDDI_) when using JPA
-------------------------------------------------------

                 Key: JUDDI-136
                 URL: https://issues.apache.org/jira/browse/JUDDI-136
             Project: jUDDI
          Issue Type: Task
            Reporter: Kurt Stam
            Assignee: Kurt T Stam
             Fix For: 3.0


We may be able to see how jBPM handles this, they use straight hibernate though. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: juddi-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: juddi-dev-help@ws.apache.org


[jira] Commented: (JUDDI-136) How to deal with a table prefix (JUDDI_) when using JPA

Posted by "Kurt T Stam (JIRA)" <ju...@ws.apache.org>.
    [ https://issues.apache.org/jira/browse/JUDDI-136?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12671856#action_12671856 ] 

Kurt T Stam commented on JUDDI-136:
-----------------------------------

We should keep the setting of the prefix configurable. Unfortunately is does not seem that JPA, and neither the OpenJPA and Hibernate implementations support this.

In Hibernate we will need to add our own ImprovedNameStrategy as described here: http://forum.hibernate.org/viewtopic.php?p=2376564&sid=d707c1d84722234dafbeae72a7e8dba9

In In OpenJPA, this can be
accomplished by creating an extended DBDictionary and overriding the
getValidTableName() method." 
I posted the question on their forum: http://n2.nabble.com/Is-there-any-way-to-configure-a-table-prefix-across-all-entity-tables--td2289858.html

> How to deal with a table prefix (JUDDI_) when using JPA
> -------------------------------------------------------
>
>                 Key: JUDDI-136
>                 URL: https://issues.apache.org/jira/browse/JUDDI-136
>             Project: jUDDI
>          Issue Type: Task
>            Reporter: Kurt T Stam
>            Assignee: Kurt T Stam
>             Fix For: 3.0beta
>
>
> We may be able to see how jBPM handles this, they use straight hibernate though. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (JUDDI-136) How to deal with a table prefix (JUDDI_) when using JPA

Posted by "Kurt T Stam (JIRA)" <ju...@ws.apache.org>.
    [ https://issues.apache.org/jira/browse/JUDDI-136?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12671856#action_12671856 ] 

kurtstam edited comment on JUDDI-136 at 2/9/09 5:55 AM:
-----------------------------------------------------------

We should keep the setting of the prefix configurable. Unfortunately is does not seem that JPA, and neither the OpenJPA and Hibernate implementations support this.

In Hibernate we will need to add our own ImprovedNameStrategy as described here: http://forum.hibernate.org/viewtopic.php?p=2376564&sid=d707c1d84722234dafbeae72a7e8dba9

In OpenJPA, this can be
accomplished by creating an extended DBDictionary and overriding the
getValidTableName() method." 
I posted the question on their forum: http://n2.nabble.com/Is-there-any-way-to-configure-a-table-prefix-across-all-entity-tables--td2289858.html

      was (Author: kurtstam):
    We should keep the setting of the prefix configurable. Unfortunately is does not seem that JPA, and neither the OpenJPA and Hibernate implementations support this.

In Hibernate we will need to add our own ImprovedNameStrategy as described here: http://forum.hibernate.org/viewtopic.php?p=2376564&sid=d707c1d84722234dafbeae72a7e8dba9

In In OpenJPA, this can be
accomplished by creating an extended DBDictionary and overriding the
getValidTableName() method." 
I posted the question on their forum: http://n2.nabble.com/Is-there-any-way-to-configure-a-table-prefix-across-all-entity-tables--td2289858.html
  
> How to deal with a table prefix (JUDDI_) when using JPA
> -------------------------------------------------------
>
>                 Key: JUDDI-136
>                 URL: https://issues.apache.org/jira/browse/JUDDI-136
>             Project: jUDDI
>          Issue Type: Task
>            Reporter: Kurt T Stam
>            Assignee: Kurt T Stam
>             Fix For: 3.0beta
>
>
> We may be able to see how jBPM handles this, they use straight hibernate though. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (JUDDI-136) How to deal with a table prefix (JUDDI_) when using JPA

Posted by "Kurt T Stam (JIRA)" <ju...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/JUDDI-136?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kurt T Stam updated JUDDI-136:
------------------------------

    Fix Version/s:     (was: 3.0)
                   3.0beta

> How to deal with a table prefix (JUDDI_) when using JPA
> -------------------------------------------------------
>
>                 Key: JUDDI-136
>                 URL: https://issues.apache.org/jira/browse/JUDDI-136
>             Project: jUDDI
>          Issue Type: Task
>            Reporter: Kurt T Stam
>            Assignee: Kurt T Stam
>             Fix For: 3.0beta
>
>
> We may be able to see how jBPM handles this, they use straight hibernate though. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (JUDDI-136) How to deal with a table prefix (JUDDI_) when using JPA

Posted by "Kurt T Stam (JIRA)" <ju...@ws.apache.org>.
    [ https://issues.apache.org/jira/browse/JUDDI-136?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12671856#action_12671856 ] 

kurtstam edited comment on JUDDI-136 at 2/9/09 5:55 AM:
-----------------------------------------------------------

We should keep the setting of the prefix configurable. Unfortunately is does not seem that JPA, and neither the OpenJPA and Hibernate implementations support this.

In Hibernate we will need to add our own ImprovedNameStrategy as described here: http://forum.hibernate.org/viewtopic.php?p=2376564&sid=d707c1d84722234dafbeae72a7e8dba9

In OpenJPA, this can be accomplished by creating an extended DBDictionary and overriding the
getValidTableName() method." I posted the question on their forum: http://n2.nabble.com/Is-there-any-way-to-configure-a-table-prefix-across-all-entity-tables--td2289858.html

      was (Author: kurtstam):
    We should keep the setting of the prefix configurable. Unfortunately is does not seem that JPA, and neither the OpenJPA and Hibernate implementations support this.

In Hibernate we will need to add our own ImprovedNameStrategy as described here: http://forum.hibernate.org/viewtopic.php?p=2376564&sid=d707c1d84722234dafbeae72a7e8dba9

In OpenJPA, this can be
accomplished by creating an extended DBDictionary and overriding the
getValidTableName() method." 
I posted the question on their forum: http://n2.nabble.com/Is-there-any-way-to-configure-a-table-prefix-across-all-entity-tables--td2289858.html
  
> How to deal with a table prefix (JUDDI_) when using JPA
> -------------------------------------------------------
>
>                 Key: JUDDI-136
>                 URL: https://issues.apache.org/jira/browse/JUDDI-136
>             Project: jUDDI
>          Issue Type: Task
>            Reporter: Kurt T Stam
>            Assignee: Kurt T Stam
>             Fix For: 3.0beta
>
>
> We may be able to see how jBPM handles this, they use straight hibernate though. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (JUDDI-136) How to deal with a table prefix (JUDDI_) when using JPA

Posted by "Kurt T Stam (JIRA)" <ju...@ws.apache.org>.
    [ https://issues.apache.org/jira/browse/JUDDI-136?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12671856#action_12671856 ] 

kurtstam edited comment on JUDDI-136 at 2/9/09 5:56 AM:
-----------------------------------------------------------

We should keep the setting of the prefix configurable. Unfortunately it does not seem that JPA, and neither the OpenJPA and Hibernate implementations support this.

In Hibernate we will need to add our own ImprovedNameStrategy as described here: http://forum.hibernate.org/viewtopic.php?p=2376564&sid=d707c1d84722234dafbeae72a7e8dba9

In OpenJPA, this can be accomplished by creating an extended DBDictionary and overriding the
getValidTableName() method." I posted the question on their forum: http://n2.nabble.com/Is-there-any-way-to-configure-a-table-prefix-across-all-entity-tables--td2289858.html

      was (Author: kurtstam):
    We should keep the setting of the prefix configurable. Unfortunately is does not seem that JPA, and neither the OpenJPA and Hibernate implementations support this.

In Hibernate we will need to add our own ImprovedNameStrategy as described here: http://forum.hibernate.org/viewtopic.php?p=2376564&sid=d707c1d84722234dafbeae72a7e8dba9

In OpenJPA, this can be accomplished by creating an extended DBDictionary and overriding the
getValidTableName() method." I posted the question on their forum: http://n2.nabble.com/Is-there-any-way-to-configure-a-table-prefix-across-all-entity-tables--td2289858.html
  
> How to deal with a table prefix (JUDDI_) when using JPA
> -------------------------------------------------------
>
>                 Key: JUDDI-136
>                 URL: https://issues.apache.org/jira/browse/JUDDI-136
>             Project: jUDDI
>          Issue Type: Task
>            Reporter: Kurt T Stam
>            Assignee: Kurt T Stam
>             Fix For: 3.0beta
>
>
> We may be able to see how jBPM handles this, they use straight hibernate though. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (JUDDI-136) How to deal with a table prefix (JUDDI_) when using JPA

Posted by "Kurt T Stam (JIRA)" <ju...@ws.apache.org>.
    [ https://issues.apache.org/jira/browse/JUDDI-136?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12675097#action_12675097 ] 

Kurt T Stam commented on JUDDI-136:
-----------------------------------

The easy way out would be to hard-code the juddiv3_  prefix to each table name, maybe the next JPA spec will support it. 

> How to deal with a table prefix (JUDDI_) when using JPA
> -------------------------------------------------------
>
>                 Key: JUDDI-136
>                 URL: https://issues.apache.org/jira/browse/JUDDI-136
>             Project: jUDDI
>          Issue Type: Task
>            Reporter: Kurt T Stam
>            Assignee: Kurt T Stam
>             Fix For: 3.0beta
>
>
> We may be able to see how jBPM handles this, they use straight hibernate though. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (JUDDI-136) How to deal with a table prefix (JUDDI_) when using JPA

Posted by "Marcos Vincius (JIRA)" <ju...@ws.apache.org>.
    [ https://issues.apache.org/jira/browse/JUDDI-136?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12636654#action_12636654 ] 

Marcos Vincius commented on JUDDI-136:
--------------------------------------

Hello!


I've find a solution regarding dealing with table prefixes when using open JPA. 
So i put an anotation right above the class name that is going to represent the 
table in the database. The annotation is:

@Table {name="name_of_the_table"}

For example:
----------------------------------------------------------------------------------------------------------------

import javax.persistence.*;

@Entity
@Table(name="juddi_BusinessEntity")
public class Message {
    @Id    
    private int id = 12;

    @Basic
    private String name;   

    public BusinessEntity() {
    }

    public BusinessEntity(String name) {
        this.name = name;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getId() {
        return id;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }    
}

----------------------------------------------------------------------------------------------------------------




> How to deal with a table prefix (JUDDI_) when using JPA
> -------------------------------------------------------
>
>                 Key: JUDDI-136
>                 URL: https://issues.apache.org/jira/browse/JUDDI-136
>             Project: jUDDI
>          Issue Type: Task
>            Reporter: Kurt Stam
>            Assignee: Kurt T Stam
>             Fix For: 3.0
>
>
> We may be able to see how jBPM handles this, they use straight hibernate though. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: juddi-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: juddi-dev-help@ws.apache.org


[jira] Closed: (JUDDI-136) How to deal with a table prefix (JUDDI_) when using JPA

Posted by "Kurt T Stam (JIRA)" <ju...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/JUDDI-136?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kurt T Stam closed JUDDI-136.
-----------------------------

    Resolution: Fixed

This should cover 80% of this requirement. I will try putting in an enhancement request for the JPA spec.

> How to deal with a table prefix (JUDDI_) when using JPA
> -------------------------------------------------------
>
>                 Key: JUDDI-136
>                 URL: https://issues.apache.org/jira/browse/JUDDI-136
>             Project: jUDDI
>          Issue Type: Task
>            Reporter: Kurt T Stam
>            Assignee: Kurt T Stam
>             Fix For: 3.0beta
>
>
> We may be able to see how jBPM handles this, they use straight hibernate though. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.