1. How to use join in an HQL update? stackoverflow.comI know how to join tables in an SQL update but how do I do it in HQL? Long story: I have items which I process in a run. Each run as ... |
2. Many-To-Many JPA only updating join table on Persist and not on Merge??? coderanch.com@Test public void testConAppUser() { EntityManager em = helper.getEm(); em.getTransaction().begin(); // Get two AppUsers to add to the many-to-many collection of Contact AppUser appUser1 = appUserDao.findById(1); AppUser appUser2 = appUserDao.findById(6); // Create new Contact and add the 2 AppUsers Contact contact = new Contact(); contact.setFirstName("John"); contact.addAppUser(appUser1); contact.addAppUser(appUser2); em.persist(contact); em.flush(); // Inserts 2 records into the join_table - perfect! // Get an ... |
3. Hibernate: Different Join in Save() and Get() coderanch.com |
4. join updates table? forum.hibernate.orgDoing the following join : lasSecciones = GuiSGP.session.find("select seccion from Seccion seccion "+ "join seccion.vigencia vigencia "+ "where F_IdSuplemento =" + idSuplemento + " and A_Habilitado =" + 1 + " and A_BajaLogica =" + 0 +" and vigencia.fechaDesde > '"+fecha+"'" ); Makes hibernate update vigencia ,why is that happening ?. Hibernate: select secciones0_.P_IdElementoEditorial as P_IdElem1___, secciones0_.F_IdSuplemento as F_IdSupl2___, vigencia1_.P_IdVigencia as ... |
5. many-to-many with atributte: does not save on join table. forum.hibernate.orgHi, I have a many-to-many relationship between Purchase and Goods and the join table has a atributte named by quantity. When I save a Purchase object, the data on join table is not saved. My codes are: [code] public class RelationshipPurchaseGoods implements Serializable { /** * */ private Goods goods; /** * */ private int quantity; /** * Returns the value ... |
6. many-to-many problem: no entries saved in join table forum.hibernate.orgNewbie Joined: Sun Sep 19, 2004 12:22 am Posts: 6 I'm trying to write data to a three tables that form a many to many relationship: books, authors, and author_book (the join table). My problem is that hibernate is not writing to author_books. Thus loosing the association between the books and their authors. SchemaExport creates the tables correctly (shown below). I ... |
7. Remove an outer join when I don't need it? forum.hibernate.org |
8. buk update with no join forum.hibernate.orgHello! i'm trying to make a bulk update: String hqlUpdate = "update GroupMobilePhoneAddressesElement " +" set groupCount = :newGroupCount " +" where mobilePhoneAddress.id = :theMpaId"; session.createQuery( hqlUpdate ) .setString( "newGroupCount", ""+newGroupCount ) .setString( "theMpaId", ""+theMpaId) .executeUpdate(); the erroneous sql generated is: Hibernate: update rel_group_mobile_phone_address set GROUP_COUNT=? where groupmobil0_.ID=? and the oracle error is java.sql.SQLException: ORA-00904: not valid column name how I ... |
9. Update whilst joining forum.hibernate.orgBasically i want to update a status flag on all rows in one table based on a join on another table... for eg in SQL update TABLE_1 as A inner join TABLE_2 as B on A.table2_id = B.id set A.status = 2 where B.status = 9 so my guess in HSQL was along the lines of.. update TABLE_1 tb1 left join ... |
10. I cant' update with join table. forum.hibernate.orgDear Friends. I have 3 tables. One of this tables is a join among the two others. Follow the hbms: TABLE 1 |
11. update join table forum.hibernate.orgDear all. I am quite a hibernate beginner, so please excuse if my question seems simple. I have the following mapping: Code: |
12. Join table not being updated forum.hibernate.orgHibernate version:3.1.3 I've got the following hibernate mappings defined: Code: |
13. Error when trying to execute update with subselect with join forum.hibernate.orgUPDATE Test AS t SET t.situation = ? WHERE t.id IN ( SELECT te.id FROM test AS te ... |
14. Hibernate: Different Join in Save() and Get() forum.hibernate.orgI have 2 tables viz. TABLE1 and TABLE2: TABLE1 has it's PK as {ID} TABLE2 has composite-id as {A,B,C}... TABLE2 also has a column {D} TABLE1 and TABLE2 are associated with one-to-one mapping TABLE1.ID=TABLE2.A Cascade-save is on. Case1:Save() I want TABLE1.ID=TABLE2.A and TABLE2.B='1' and TABLE2.C='2' Case2:Get() I want TABLE1.ID=TABLE2.A and TABLE2.B='1'and TABLE2.D='4' How should i define this mapping? Presently i have ... |
15. One-to-Many unidirectional not saving Join table forum.hibernate.orgHi, I have a one-to-many unidirectional association using a Join table. What I would think to be a pretty vanilla case. What I am seeing is that on save (saveOrUpdate) the entity tables are getting updated great, but the Join Table I have specified is not. I then go to read the parent entity and none of the associated entities are ... |