1. Use type of object in HQL where clause stackoverflow.comIn my domain model I have an abstract class CommunicationChannelSpecification, which has child classes like FTPChannelSpecification, EMailChannelSpecification and WebserviceChannelSpecification. Now I want to create an HQL query which contains a where ... |
2. Sorting on Column in Type Table with ColdFusion ORM stackoverflow.comI have three tables, with the following structure: http://dl.dropbox.com/u/2586403/ORMIssues/TableLayout.png The three objects I'm dealing with are here: http://dl.dropbox.com/u/2586403/ORMIssues/Objects.zip I need to be able to get a PartObject, and then ... |
3. Can I specify the result object type for an HQL query? stackoverflow.comI have an entity in a hibernate instance called keywords. It stores a list of words and the number of times each word occurs. Words are not unique. I want to ... |
4. How to deal with Object type returned by JPQL query? stackoverflow.comI can do this easily with JPQL that only returns data from one table.
That means one data type is returned. So I can just store the query ... |
5. Using Hibernate to find the specific database type for a given Java type stackoverflow.comIs there a class that I could use in Hibernate so that I could pass in a class and it would return the appropriate database type name? For example,
Hibernate ... |
6. Fluent NHibernate HQL Assigning multiple class types to multiple table select query stackoverflow.comI know how to assign class type to the data retrieved from single table like this: HQL query:
Code:
|
7. Set selection of typesafe JPA 2 query with joins stackoverflow.comI have simple query with two joins:
|
8. type-safe JPA2 -how to handle select with 'not-in' clause stackoverflow.comhI am converting my JPQLs to type-safe queries and am not sure how to handle queries that have 'not in' clause. select p from Person p a WHERE p.address.id = :id ... |
9. Create typed query through the session factory in JPA/Hibernate stackoverflow.comI generally want to do something like this:
But through the session factory rather than the entity manager.
Something like:
It should be ... |
10. Possibilities and limitations of executing a criteria query on a java.net.URL type object stackoverflow.comI have a database table where I store URLs (http://google.com for example). The entity corresponding to the table has a URL type field, so I create a criteria query like the ... |
11. HQL Query return type coderanch.com |
12. Hibernate query using a custom user type coderanch.comAll, I'm trying to create a Hibernate query. Here's my named query that works so far that I define in my mapping file: |
13. Is this type of group by query possible in JPA ? coderanch.com |
14. hibernate - how to handle a query that returns more types of objects coderanch.com |
15. Using column of type CLOB in where clause throws ORA-00932 forum.hibernate.orgHi all, I have an application where some of the hibernate entities have string properties larger than 4000 characters. Those properties are mapped with type="text". The hibernate schema generation mechanism craetes columns of type CLOB for those entity properties, which is perfect. The problem is, when I try to execute a HQL query where the CLOB column is in the where ... |
16. JPA - Named Queries - Get parameter types forum.hibernate.org |
17. HQL query returning improper type forum.hibernate.orgI am writing a simple query in hibernate. It is not returning the proper information. So my code looks like this: Code: List |
18. Sorting a DB table column of 'Date' type based on Date only forum.hibernate.orgHi, In hibernate, I am trying to get a resultset after performing a sort on a table column in DB. The table column is of Date data type and contains entries with date and time. Here, I am using criteria.addOrder(Order.desc("dateTime")); where dateTime is a Date data type. However, my sort does not work as intended as the sorting is done based ... |
19. Object type problem with Hiberante Criteria Query forum.hibernate.orgCriteria cri = this.session.createCriteria( Book.class ) .add( eq( "type" , "food" ) ) .addOrder( Order.asc( "serNo" ) ); cri.setFetchMode( "authorInfo" , FetchMode.JOIN ); ... |
20. Automatically Inferring Types With Native Queries forum.hibernate.orgHi, I'm running native queries via createSQLQuery(). When the query is returned, all objects in the list are of Strings. I've not set any Scalar values and don't want to. I was hoping Hibernate would infer the types from the ResultSet but this doesn't seem to be the case. Is there anyway I obtain get this behaviour? Thanks, Sam |
21. Type Hierarchies: Queries in JPQL vs. Criteria API forum.hibernate.orgHi all, in my projects data model some Type Hierarchies are mapped using a Descriminator Column on an abstract base Type. Sometimes Types have references to abstract base Types but I have to do queries on specialized Attributes. Currently Im using Sub-Queries e.g. Code: @Entity @DiscriminatorColumn(length = 2) class Base{ String value; ... } @Entity @DiscriminatorValue("A") class ... |
22. How to query a value typed object forum.hibernate.orgI am trying to learn hibernate and I came across this little problem en route. Any help will be appreciated. I have created a entity and a value typed object. My entity is of type Person which is mapped to value object of Address. The mapping is given below: Code: 1. ... |
23. Could not resolve property type in Query forum.hibernate.orgHi, I'm trying to execute the following query with hibernate : from org.smartcomps.twister.engine.priv.core.dynamic.impl.ProcessInstanceImpl as instance join fetch instance.properties as props where props.name in (:propNames) and props.value in (:propValues) I'm getting this exception : net.sf.hibernate.QueryException: could not resolve property type: name [from org.smartcomps.twister.engine.priv.core.dynamic.impl.ProcessInstanceImpl as instance join fetch instance.properties as props where props.name in (:propNames0_, :propNames1_) and props.value in (:propValues0_, :propValues1_)] Here is ... |
24. Scalar Queries do not seem to work with Custom Type forum.hibernate.orgI am using a UserType to map Clob to String , the code is similar to the example provided in http://hibernate.bluemars.net/76.html . The nullsafeget method is like this: public Object nullSafeGet(ResultSet rs, String[] names, Object owner) throws HibernateException, SQLException { Clob clob = rs.getClob(names[0]); return clob.getSubString(1, (int) clob.length()); } The mapping class is : public class Dummy { String id; String ... |
25. Problem resolving property type in where clause forum.hibernate.orgI have a column in MySQL which is a smallint unsigned. I am using a short type for this in the hbm.xml file but Hibernate is not liking this in a where clause. What is wrong with this type and how can I track it down? Thanks, SZ net.sf.hibernate.QueryException: could not resolve property type: forumid [select thread.threadid, thread.forumid, thread.title, thread.postusername, thread.replycount, ... |
26. using custom value types in HQL query forum.hibernate.orgI've created my own value type to extract some strange encoded boolean values and send them to my java app in a well formed Boolean object. It works, but I don't understand how to use these types in a query : for example : my custom value type is "myownpackage.MyBoolean" s.iterate( "from XXX as p where p.strangevalue = ?", new Boolean(true),myownpackage.MyBoolean.????); ... |
27. Which collection type for sorted collection? forum.hibernate.orgA colleague and I are going round and round on trying to figure out which Hibernate collection type will best fit our need for an ordered collection that does NOT have a good candidate column for an index. We have several scenarios where the collections in question use either dates or strings or large integer numbers (abstract keys) to determine their ... |
28. Types collection query error forum.hibernate.orgNewbie Joined: Wed Apr 21, 2004 12:03 pm Posts: 4 Folks, We are getting an error when we query using hibernate in a particular situation. We have a many-to-many relationship between a persistent class and a hibernate persistent enum. The queries work fine if the constraints are just based on values from the persistent class. The returned objects correctly return the ... |
29. Many to Many Types collection query error forum.hibernate.org |
30. could not resolve property type userId in the query excetion forum.hibernate.orghi! i got one exception like that ******************************************** net.sf.hibernate.QueryException: could not resolve property type: userId [SELECT groupHBM FROM com.liferay.portal.ejb.UserHBM userHBM JOIN userHBM.groups AS groupHBM WHERE userHBM.userId = ? AND userHBM.portalId = ? ORDER BY name ASC] Tables used as following user_ fields ****** 1)userId 2)portalId 3)password 4)firstname group_ fields ***** 1) groupId 2) portalId users_groups(Mapping table for user and group) fields ... |
31. query question using the session.find(query,object[],types[] forum.hibernate.org |
32. select cat,count(*) from cat groupt by cat.type --> resul forum.hibernate.orgdear all... how to get the cat as Cat and the count of cats by giving the query as "select cat,count(*) from cat groupt by cat.type" to the following function? i am getting my function works fine. but i couldnt get the results wht i desired thru java codings...rather i dunno...! am i right in defining the function which returns Collection ... |
33. Sort collection by class type forum.hibernate.orgHello all, Let me explain the situation: We have an interface or abstract super class X with several implementors A, B, C and so on... When I get all Object of type X like this: Query q = session.createQuery("from X x "); I want to sort them by their classes. For example: objects of type C before A before B C ... |
34. Query by criteria available for custom user types? forum.hibernate.org |
35. Re: Urgent Please Help regarding Query return type forum.hibernate.orgI am running the following query, I get a list size of 160. How do I cast the objects returned to date type, I get an exception Regards, Vinaypal Hibernate version:2.1.8 [b]Mapping documents: Named Query |
36. how works method find(query,objet[],Type[])? forum.hibernate.org |
37. HQL query returning unexpected type forum.hibernate.orgAuthor Message Scott Post subject: HQL query returning unexpected type Posted: Fri Jul 08, 2005 11:37 pm Beginner Joined: Sat May 01, 2004 2:44 am Posts: 32 Location: Brisbane, Australia Hi all, I am having a strange problem with a HQL query I am running. My object model looks (simplified) like this: Code: CustomerQuoteRate: Customer customer; ... |
38. Select into type safe object: Ordering forum.hibernate.orgMy question was; How is it possible to order by a type safe object? If you need mapping information, I can supply that however, I don't feel it is relevant. I'm not asking someone to solve my problem, I'm asking if and how it is possible to order/access a type safe object. The exception I'm experiencing is due to me not ... |
39. Using TEXT column type in a where clause? forum.hibernate.orgI'm writing an application that needs to be run in Oracle and SQL Server and needs to support AL16UTF16 and UTF-8 character sets respectively. I need a column that could be up to 4000 characters or greater, so I was going to map the text type to a NCLOB and NTEXT (oracle/Sql Server) column. But i was then told by people ... |
40. selecting into type safe object forum.hibernate.orgRegular Joined: Thu Sep 23, 2004 11:53 am Posts: 83 Need help with Hibernate? Read this first: http://www.hibernate.org/ForumMailingli ... AskForHelp Hibernate version: 3.1 Mapping documents: Code: |