jpa - Default name for database objects -


i'm trying find out column name jpa uses when there's no explicit name set.

example:

@entity public class testtype {     private boolean   active;     private character testtypecode;      public boolean getactive() {         return active;     }      public void setactive(boolean active) {         this.active = active;     }      @id     public character gettesttypecode() {         return testtypecode;     }      public void settesttypecode(character testtypecode) {         this.testtypecode = testtypecode;     } } 

what name used primary key column, column name used property "active" , table name used. i'm looking specification of names jpa uses default.

it chapter "2.13 naming of database objects" specifies (jpa 2.0 spec).

this specification requires following regard interpretation of names referencing database objects. these names include names of tables, columns, , other database elements. such names include names result defaulting (e.g., table name defaulted entity name or column name defaulted field or property name).

in example, table name testtype, id column name testtypecode , active column called same. please note, in sql standard column , table names case insensitive, although there counterexamples (e.g mysql on unix: table names case sensitive).


Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -