ObjectDB ObjectDB

how to create only table structure.

#1

hi,

I want to create only a table without insertions of data. And also table contains constraints like not_null, unique, primary key etc.

Ex: (In sql) create table emp (id int(5) primary key, name varchar2(20)); , so it will create only table. when we want to see the table structure then "desc emp;"  it will show the structure of table.

edit
delete
#2

ObjectDB is not an RDBMS and doesn't have the table concept.

You can register an entity class without persisting instances of that class by:

    em.getMetamodel().entity(MyEntity.class);
ObjectDB Support
edit
delete

Reply

To post on this website please sign in.