[jboss-user] [JBoss Tools] - JPA Tools & generate tables from entities

Eric J. Van der Velden do-not-reply at jboss.com
Thu Apr 28 14:13:33 EDT 2011


Eric J. Van der Velden [http://community.jboss.org/people/ericjvandervelden] created the discussion

"JPA Tools & generate  tables from entities"

To view the discussion, visit: http://community.jboss.org/message/602600#602600

--------------------------------------------------------------
Hello

I create a JPA project and do 
New-> Entity

It is a class type M with a @Entity and one field, id with a @Id. 

There is a error message: table "M" cannot be resolved. I understand that, because this table is not there yet.

I do
JPA Tools-> Generate Tables from Entities...

I check "Export to database". The result is that schema.ddl is generated but no table M in the database appears (Q1). 

So I decided to do it by hand. But in the editor I see that the 'Connection profile' just above schema.ddl is not filled in (Q2). I fill it in by chosing my database connection's name and select the ddl in schema.ddl and execute it. Now my table M is there, which I see by selecting my schema in the 'Data Source Explorer' view, and refresh it. I have to do this anyway because now I can clean my JPA project and the error message: table "M" cannot be resolved, will disappear.  

So my questions are: (Q1) why is table M not created? and  (Q2) why is 'Connection profile' not filled in. Or is it the intention of JBoss Tools that I create the table by hand by right clicking in  schema.ddl?

Thanks, 

Eric J.
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/602600#602600]

Start a new discussion in JBoss Tools at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2128]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110428/419846f4/attachment.html 


More information about the jboss-user mailing list