Skip to content
Advertisement

Tag: mysql

org.hibernate.hql.internal.ast.QuerySyntaxException: table is not mapped [from table]

I’m trying to learn to use Hibernate using MySQL, I’ve never worked with it before and after a chain of errors I finally get stucked with this: I’ve tried with possible solutions of another questions, but nothing, it doesn’t work. This is what I’ve done so far: hibernate.cfg.xml (Folder src) country.hbm.xml (Folder *srcmainresourcesorghibernatetutorialhbm*) country.java Test.java – Edit 20130301 I’ve altered

MySQL Batchupdate() with ON DUPLICATE KEY UPDATE

I am using batchUpdate() to insert multiple records in a table. As per the requirement, if there is a duplicate value for a primary key while inserting it should be updated with the latest received data, hence I was trying to use ON DUPLICATE KEY UPDATE in INSERT statement. The ON DUPLICATE KEY UPDATE works good when I use a

Draw an ERD from Hibernate Mapping Files

I know it’s possible to reverse engineer from the database into mapping files but does anyone know if it’s possible to get hibernate to draw an ERD based on its own mapping files so that I can compare Hibernate’s ERD with the Databases one? Answer I achieved this by using: in my hibernate.cfg.xml Then I used MySQL Workbench to reverse

Want to store Object in MySQL database

I have a variable in java which return type is Object(java.lang.Object). I want to store this variable value in MySQL database without casting in any other primitive data type. Is there any data type available in MySQL related to Object? Answer You can use a BLOB to store the raw data, but otherwise no, MySQL does not have a datatype

Advertisement