1. JPA - map entity to sql query? stackoverflow.comI'm writing a JPA connector to a legacy sistem. The problem is, DB design in the system is.. well.. horrible. I need to implement an entity that maps to three tables. I ... |
2. Hibernate - New colums from a joined table stackoverflow.comI have a class User object. I am trying to load this object from the Database using Hibernate. My SQL statement is:
|
3. Hibernate computed property and SQL-Queries stackoverflow.comI've implemented a computed property to my configuration which works fine if I'm using HQL only. Sadly there are places where SQL-Queries are executed which I can't build into HQL. Am ... |
4. Hibernate Criteria - Return parent records that have child records stackoverflow.comAll, I'm probably over-analyzing this problem, but... Given table "A" with two one-to-many relationships "A1" and "A2", return all records in table "A" that have at least one child record in either table ... |
5. mybatis, the world's most popular sql mapping framework? stackoverflow.commybatis' homepage has this quote
There are only 16 questions on StackOverflow about mybatis, compared to 5,299 on hibernate. Look at Google trends. ... |
6. Many to Many Mapping in Hibernate without Collection stackoverflow.comGiven a classic example of Student and Subject where they have a many-to-many relationship, is there any way to map them using POJOs w/o the use of Collections? e.g. Student.java
|
7. Hibernate one to one mapping using only foreign id stackoverflow.comGiven we have tables Person (id, address_id) and Address (id, town)and POJO class Person {} ... |
8. hibernate - many-to-one using addJoin stackoverflow.comI have a many-to-one relationship, where a MessageContents object has a set of Messages, and each Message has a foreign key to a MessageContents. I have the following query:
|
9. sample examle of Hibernate one-one mapping including sql tables coderanch.com |
10. plz provide complete example of hibernate mapping one to many with SQL tables coderanch.comShreya, please do not create two seperate accounts and then post as though you are two different people. Your other post here. http://www.coderanch.com/t/217326/ORM/java/plz-provide-Complete-example-Hibernate Is under a different name, and you are asking a very big open ended question, which is what an internet troll would do, so I am closing these two threads. If you really need help, please first do ... |
11. Hibernate mapping sql char to java char coderanch.com |
12. class property and sql-query return-property strict mapping? forum.hibernate.orgHi buddies, I am a beginner in hibernate field, now I am doing a project which uses hibernate to call procedures, now It works, but an issue is not fixed. I have a module called Opportunity which has more than sixty columns, so in opportunity.hbm.xml, |
13. How to map results of a SQL query forum.hibernate.orgRegular Joined: Tue Oct 10, 2006 2:21 pm Posts: 58 I wish to execute a query containing an outer join of two not-really-related tables. By "not-really-related" I mean that there is a many-to-many relationship between two tables in which there may or may not be a coincidental match between two columns. (A user may match 0-to-many Speed Dial names to a ... |
14. How to map java Enumerations to a SQL column? forum.hibernate.org |
15. sql-query in the mapping file forum.hibernate.org |
16. Inheritance in SQL query forum.hibernate.orgHi, I am running Hibernate 2.1.1 and Oracle 9.2 for my web application. I have two classes one inherited from the other class Person:- Code: /** @hibernate.class */ public class Person { private Integer personId private String loginName; ... /** @hibernate.id generator-class="native" */ public Integer getPersonId() { ... |
17. Mapping for SQL SET type? forum.hibernate.orgDoes Hibernate offer any convenient mapping for the SQL SET type? From the MySQL manual: A SET is a string object that can have zero or more values, each of which must be chosen from a list of allowed values specified when the table is created. I am thinking about Hibernate mapping an SQL SET to maybe a java.util.Set or an ... |
18. How to map SQL datetime to persistent class? forum.hibernate.orgHi all, I am facing a problem in getting the time value from the persistent class. In DB the type is datetime (8) and I have mapped that column to a property of type java.sql.Date, but when I try to print the time value (from persistent class ) it prints 24.00 (i.e, it is taking a constant value of 12 am ... |
19. specifying an SQL WHERE condition when mapping a collection forum.hibernate.orgI was wondering if it were possible to specify a runtime variable in the SQL where condition when mapping a collection. The document explains the usage of the |
20. How much flexibility in Hibernate<->SQL type mappings? forum.hibernate.org |
21. Mapping a CIDR (Classless Inter-Domain Routing) SQL type ? forum.hibernate.orgHibernate version: 2.1.3 Hello I am using the sql type CIDR to store various ip ranges and perform builtin Postgresql functions like broadcast(), netmask() and such. When I use Middlegen to generate the POJOs and the mapping files, it does not seem to understand this type, then reverts to java.lang.Object. This causes an Hibernate property exception, saying this property has a ... |
22. Executing simple non-mapped SQL forum.hibernate.orgI'm in the process of refactoring a dao with a jdbc implementation to hibernate. In the dao there are some simple queries that don't have associated pojo's. In this case, where I want to execute a simple select statement, possibly even to just ping the database, do I need to get the connection form the session and use the jdbc api? ... |
23. sql-query mapping problem forum.hibernate.orgI have below |
24. Sql querys that do not map to objects forum.hibernate.orgIs there a way to map an sql statement to a java class that doesnt exist. The reason I would want to do such a thing is because the reporting portion of my application returns result sets that do not directly map to domain objects. Here is a simplified example of what I would like to do. Code: |
25. Does Hibernate require sql queries to be in specific mapping forum.hibernate.org |
26. Named SQL Query in the Mapping Files forum.hibernate.orgHi all, I am having a problem creating a named sql query in a hibernate mapping file. If i take out the |
27. Using |
28. SQL for Parent/Child relationship? forum.hibernate.org |
29. sql in hibernate without mapping forum.hibernate.orgList results = session .createSQLQuery("SELECT col1, col2 FROM table1") .addScalar("col1", Hibernate.STRING) .addScalar("col2", Hibernate.INTEGER) .list(); for (Iterator iter = results.iterator; iter.hasNext(); ) { ... |
30. EJBQL to sql mapping forum.hibernate.orghi all! i have a problem with the following setup. i have two entities mapped to exactly two tables in oracle. i would like to generate list with dynamic filtering, so i have an ejbql fragment (select prop1, prop2.prop1, prop3 from entity1) creating the where condition at runtime. i have problem with the sql hibernate generates from this code. the problem ... |
31. Mapping an object to an SQL [SOLVED] forum.hibernate.orgHi Ajay, how about creating a native query and supply a result-set-mapping? This works for me when using JPA, but there's also a plain hibernate solution for this, see the docs, section 16.4 (http://www.hibernate.org/hib_docs/reference/en/html_single/). Note that this solution requires the Data-class is an Entity. Something (in your orm.xml) like: Code: |
32. Hibernate SQL Table mapping problem forum.hibernate.orgHello, I have a question about the mapping of hibernate. There are attributes for defining the table name and the column name. In my case hibernate seems to completely ignore them. I have the tables created in uppercase in my database. Hibernate says, that the tables were not created. If I tell hibernate to create the tables, it creates the tables ... |
33. Named SQL Query in Mapping - beginner question forum.hibernate.orgI read through the Introduction chapter today (ok - I skimmed throught it) but couldnt find any answers to my questions there, nor in the FAQ. Im a newcomer to Hibernate and trying to finish off what someone started :( I have a mapping file as below for a User (a bit stripped down for clarity). User.hbm.xml ---------------- |
34. Many-to-one not mapped in sql-query with return-join forum.hibernate.orgWe had a sql-query which was previously running until I added a many-to-one property to the class the query returns. It seems that query tries to find a column for the joined object (ent.changeReason) instead of using the return-join object. I think this is the case as if I uncomment the commented line at the bottom of the query {ent.changeReason} corresponds ... |
35. How to best map in Hibern. an java enumeration to SQL table? forum.hibernate.orgAssume I have a java class with an enumeration element public class myRecord { ... public enum state; ... } How do I define the corresponding SQL table column? Assume I define it as int: How do I specify in Hibernate a mapping enumvalue1 <-> 1 enumvalue2 <-> 2 enumvalue3 <-> 3 Peter |
36. mapping problem due to sql-delete and check="param" forum.hibernate.orgAuthor Message GlWy Post subject: mapping problem due to sql-delete and check="param" Posted: Thu Mar 26, 2009 9:12 am Newbie Joined: Tue Mar 24, 2009 6:35 am Posts: 3 greetz, We have upgraded hibernate and spring as follows: hibernate --> hibernate spring --> spring One of the things to be done was adding attribute check="param" to the sql-delete in ... |
37. mapping problem due to sql-delete and check="param" forum.hibernate.orgAuthor Message GlWy Post subject: mapping problem due to sql-delete and check="param" Posted: Thu Mar 26, 2009 9:27 am Newbie Joined: Tue Mar 24, 2009 6:35 am Posts: 3 greetz, We have upgraded hibernate and spring as follows: hibernate 3.0.5 --> hibernate 3.3.1 spring 1.2.7 --> spring 2.5.6 One of the things to be done was adding attribute check="param" ... |