Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version: 3
Mapping documents:LocGpsRecord.hbm.xml
Code between sessionFactory.openSession() and session.close():
tx = session.beginTransaction();
// [laliluna] create a new object
LocGpsRecord honey = new LocGpsRecord();
honey.setX("x");
honey.setY("y");
honey.setV("v");
honey.setA("a");
honey.setEndDeviceId("end");
honey.setD("d");
honey.setT(new Date());
honey.setTAdapter(new Date());
honey.setTCreated(new Date());
//honey.setTaste("sweet");
// [laliluna] save it to the database, Hibernate returns your object
// with the primary key field updated!
id = (Integer) session.save(honey);
tx.commit();
Full stack trace of any exception that occurs:
could not insert: [filomas.device.LocGpsRecord]
Name and version of the database you are using:
MySQL 4.0
The generated SQL (show_sql=true):
Hibernate: /* insert filomas.device.LocGpsRecord */ insert into filomdb_loc_gps_record (end_device_id, t, x, y, v, a, d, t_adapter, t_created) values (?, ?, ?, ?, ?, ?, ?, ?, ?)
Debug level Hibernate log excerpt:
Hi everybody,
Why does the sql generated has filomdb_loc_gps_record instead of filomdb.loc_gps_record? (the one I guess would be working?)
What do I miss as configuration?
Thanks in advance,
Ferhat Akcin
Erk IT