1. return multiple columns ? forum.hibernate.orgpublic List listAllEmp(){ Session session = HibernateUtil.getSessionFactory().getCurrentSession(); session.beginTransaction(); List result = session.createQuery("from empBean.Employee").list(); session.getTransaction().commit(); ... |
2. max value of column from multiple tables forum.hibernate.orgIs there any way i could use HQL to get the maximum value of columns from multiple tables.. I have a column called modifiedDate in 2 different tables, i would like get max of this, is it possible?? I tried like this.. SELECT greatest(obj1.modifiedDate, obj2.modifiedDate) FROM Object1 AS obj1, Object2 AS obj2 WHERE obj1.id = :id and obj2.object1Id = :id It ... |
3. One column to multiple columns of different tables forum.hibernate.orgThis is similar to what I am trying to do. I am using tomcat realm based security and it requires you to have 2 tables each haveing the same userName.(I included userId also so that I can update the userName) I am trying to figure this out and can't find documention on how to do it, unless I didn't understant it. ... |
4. One column to multiple columns of different tables forum.hibernate.orgThis problem was posted earlier. But there was no solution to this. I would appreciate if somebody can point me to the right direction. The diagram is like that: B <-*------ A ------*--> C But when I try so make some operation with C the following exception is raised by the persistence layer: "...Found shared references to a collection" The descriptor ... |
5. prim key on multiple columns forum.hibernate.orgHello, we're using hibernate for some time now. But we have a problem now which we can't solve. Let's say we have a database model with a table timetable and a table member. To couple these two we create a table TimetableMember. The primary key of the table TimetableMember will be the timetableid and the memberid combined so . Now we ... |
6. Left Outer Join on multiple columns allowing nulls forum.hibernate.orggreetings, I need a sugguestion for joining 2 tables on multiple fields SELECT TABLE.KEY1, TABLE1.KEY2, TABLE1.COL1, TABLE1.COL2, TABLE1.COL3, TABLE2.COLX, TABLE2.COLY FROM TABLE1 LEFT OUTER JOIN TABLE2 ON TABLE1.FIELD1 = TABLE2.FIELD2 AND TABLE1.FIELD2 = TABLE2.FIELD2 AND TABLE1.FIELD3 = TABLE2.FIELD3 the catch is there doesn't have to be an associated record in TABLE2. returning all null values is fine. and of course this ... |
7. one column participating in multiple multicolumn constraings forum.hibernate.org |
8. NamingStrategy for key columns and multiple composites forum.hibernate.org |
9. How to return columns from multiple joined tables to class forum.hibernate.orgDear Sir, I'm new to Hibernate and have not really into development using it. But I have read the tutorial and some pages from the documentation. I have a simple question which hope experience hibernate user can give some advise. Most of the time, I need the query to return columns from multiple tables. Sometime 2 tables, sometimes the same 2 ... |
10. Many-to-one with multiple columns forum.hibernate.orgNewbie Joined: Thu May 18, 2006 1:46 pm Posts: 10 Hello there! I have a many to one relationship where the end association has a composite key. The problem is that one of the keys are also being used by my many side class: Code: |
11. Uniqueness for multiple columns and joins forum.hibernate.org |
12. multiple tables for one column forum.hibernate.orgSo, while I'm pretty sure I would use the descriminator construct to do this, I'm just not sure how. Basically I have one table, comments, that has a column that links to multiple tables based on a type column within comments. IE: If comments_type is 'blog' then the reference_id is a foreign key of the blog table. If the comments_type is ... |
13. many to many over multiple columns forum.hibernate.orgHello everybody, I have a problem mapping part of my database mode and hope that somebody here can help me. I googled quite a bit on this, but I suspect that I use the wrong searchterms (since I have not found an answer yet). I have the following database model: In the domainmodel, Series has a map of Attributes. No problem ... |
14. many-to-many with multiple columns forum.hibernate.orgHello, I am new to Hibernate. I am confused how to do a mapping and implement the relationship between the following tables. Table 1: tab1col1 -- pk Table 2: tab2col1 -- pk Table 3: tab3col1 -- pk Now I have a juction table which maps these data together. Table 4: tab1col1 - tab2col1 - tab3col1 -- composite PK. Can anyone help ... |
15. one column forming uniqueness with multiple different cols forum.hibernate.orgI have a requirement like where one column forms uniqueness with multiple different columns. For example consider columns A, B and C where A+B should be unique also A+C should be unique. I can't use unique-key or natural-id because they form uniqueness with whole combination i.e, A+B+C. At data base level I can specify A+B and A+C are unique. Could anybody ... |
16. Multiple column versionning forum.hibernate.org// VERSION if ( persistentClass.isVersioned() ) { versionColumnName = ( ( Column ) persistentClass.getVersion().getColumnIterator().next() ).getQuotedName( factory.getDialect() ); } else { ... |