juddi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marcos Vincius (JIRA)" <juddi-...@ws.apache.org>
Subject [jira] Commented: (JUDDI-136) How to deal with a table prefix (JUDDI_) when using JPA
Date Fri, 03 Oct 2008 14:54:44 GMT

    [ 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


Mime
View raw message