statement « Map « JPA Q&A





1. Hibernate inherit problem while using hql statement    stackoverflow.com

I ran into a problem with Hibernate concerning hql query execution on classes which use inheritance.


Model Structure
public class Filed {

private Long id; 
private String name;

public Long getId() {
 return ...

2. Hibernate fetch MAP optimization (minimize SELECT statements)    stackoverflow.com

How to fetch a map with no additional select statements. I have a hbm like this:

            <map name="officeSet" table="office_employee" inverse="true" ...

3. Hibernate OneToOne mapping executes select statement before insert; not sure why    stackoverflow.com

I configured a simple OneToOne mapping in my entity, but when I persist the object I see a "Select" statement being executed by Hibernate just before the Insert and I don't ...

4. How to change this Hibernate property to not require a SQL statement    stackoverflow.com

I am using Hibernate dynamic-map to load DataEntry objects in my application. When I load any given DataEntry object, I want to retrieve the descriptive value of its InformationTypeId column. The ...

5. ManyToMany and IndexColumn: strange SQL update statement    forum.hibernate.org

/* update collection row Foo.bars */ update t_FooBar set c_BarUid=? where c_FooUid=? ...

6. dynamic mapped statements    forum.hibernate.org

Hi, I am a new Hibernate user and I was really impressed by the available features. However, I would like to know whether Hibernate contains something like dynamic mapped statements of iBatis. If it dosen't, what's the best way to generate queries for search forms where not all the fields are required ? Thanks in advance.

7. Problems with MySQL and catalog statement in mapping files    forum.hibernate.org

Hibernate version: 3.0.5 Mapping documents: Full stack trace of any exception that occurs: java.sql.SQLException: No database selected at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2851) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1531) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1622) at com.mysql.jdbc.Connection.execSQL(Connection.java:2385) at com.mysql.jdbc.Connection.execSQL(Connection.java:2306) ..... Name and version of the database you are using: MySQL 4.1.something I'm attempting to map an Object with Hibernate and MySQL by providing a JDBC connection to MySQL that ...

8. Mapping is generating update statement    forum.hibernate.org

Hi friends; I have tried this for quite some time and things are bouncing over my head. Please help me with this. where ever i specify one-to-one or one-to-many mapping. Hibernate is generating a update sql statement when i am trying to insert into the database. how to solve this

9. tools generated mapping - wrong insert statements upon save    forum.hibernate.org

Author Message kraro_1234 Post subject: tools generated mapping - wrong insert statements upon save Posted: Wed Jan 25, 2006 4:16 pm Newbie Joined: Wed Jan 25, 2006 3:32 pm Posts: 5 Hi, the following classes got reverse enginered from my simplified testcase database with hibernate-tools from cvs last week. Code: create table CONTAINER ( SPECIALID ...





10. HQL bulk statements and mapping names    forum.hibernate.org

Hibernate version: 3.1 To create a SQL-statement like UPDATE person set pers_type = null where pers_type = One would expect the following HQL to do this: "update " + Person.MAPPING_NAME + " set " + Person.PROPERTY_TYPE + " = null where " + Person.PROPERTY_TYPE + " = :type"; While it really is necessary to use the mapping names for the ...

11. How to execute sql statement without Mapping class    forum.hibernate.org

Hey, I am new to hibernate. I have created a database table "Test". I don't have persistent class Test.java and mapping class Test.hbm.xml. How I do an insert, update and delete into Test table using hibernate. I have tried using HQLQuery but it is keep giving me parser error. session.createQuery("insert into Test (id, id2) values (10, 11)").executeUpdate(); Thanks. Sanjeev

12. Hibernate mapping documentatiin and SQL statements    forum.hibernate.org

Hi , I would like to see exactly what kind of SQL statements will be executed when you use a mapping attribute in the hibernate documentation. it does not make any sense to exlain meaning of attributes like one-to-many or fetch="join" or lazy="true" without showing the kind of sql statements that are expected to be executed. We have to completely execute ...

13. [mapping] Calculated values in insert statement    forum.hibernate.org