create schema before insert?

10 views
Skip to first unread message

nghiep

unread,
Jan 25, 2008, 9:52:48 PM1/25/08
to Persist
Hi,

May be I was missing something from reading the quick start. I was
under impress that we don't
have to create schema (table) before using it. Please advise.

I got the following exception when trying call Persist.insert().

net.sf.persist.RuntimeSQLException: Class
[com.trapeze.appl.gp2.db.TestPersistentObj] specifies table
[TestPersistentObj] that does not exist in the database
at net.sf.persist.TableMapping.getTableName(TableMapping.java:279)
at net.sf.persist.TableMapping.<init>(TableMapping.java:77)
at net.sf.persist.Mapping.getMapping(Mapping.java:39)
at net.sf.persist.Persist.getMapping(Persist.java:208)
at net.sf.persist.Persist.getTableMapping(Persist.java:227)
at net.sf.persist.Persist.insert(Persist.java:1190)
at com.trapeze.appl.gp2.db.DBService.insert(DBService.java:203)
at com.trapeze.appl.gp2.db.DBService.main(DBService.java:266)

Could you confirm it is the case that we have to create table before
insert? Is there to generate the
schema from the POJO?

Thanks,

Nghiep

Reply all
Reply to author
Forward
0 new messages