1. NHibernate query for matching all tags stackoverflow.comHere are my relevant classes:
|
2. Finding closest match for latitude and longitude with hibernate stackoverflow.comLets say I get the user to pick long and lat on map. I have database with following fields:
How do I retrieve the closest match for long and lat with hibernate HQL ... |
3. JPA Select based on collection element match, or empty collection stackoverflow.comI have a Unit which has a UnitType and an Organization. I have a Contract which has a collection of UnitTypes and an Organization. I would like to select ... |
4. Querying for entities that match a collection in Hibernate stackoverflow.comimagine I have two entities - Tag and Text where Text has multiple tags and there are several things I would like to do with them. I would be very happy ... |
5. NHibernate HQL query for collection of values with multiple match values stackoverflow.comI'm trying to write an HQL (NHibernate 3.0) query for an entity that has a collection of values (strings). A much simplified entity:
|
6. (elegantly) Querying for number of matching days in JPQL stackoverflow.comIn one of my projects I have the following situation: I have "Availability Objects" that have a starting date and an end date. Users query for these by defining a date range ... |
7. JPA gives error on excuting named query using MySQL MATCH function stackoverflow.comNamed Query goes thus:
|
8. JPQL: sort queryresult by "best matches" possible? stackoverflow.comI have the following question/problem: I'm using JPQL (JPA 2.0 and eclipselink) and I wanna create a query that gives me the results sorted the following way: At first the results sorted ascending ... |
9. "Number of select types did not match those for insert" forum.hibernate.orgHi guys, im having some troubles when i try to make an insert with hql. This is an example of what im trying to do String hqlQuery = "insert into A (name,state) select name,:stateP from B"; Query query = session.createQuery(hqlQuery).setInteger("stateP",1); That piece of code throws me the following exception "Number of select types did not match those for insert" In Entity ... |
10. HQL query: matching collections? forum.hibernate.orgHi, I'm trying to find an HQL statement for Hibernate 2.1.8/Oracle10g/Postgres that finds all entities whose collection of names matches a list of names (named parameter :names); the result set should only contain entities that have *all* names passed; pseudo HQL: from Entity e where :names all in elements( e.names ) :categories is of type String[]. The above statement isn't valid, ... |
11. Collection subset match query forum.hibernate.orgI am assuming that parent to value is many-to-many, and that there is a mapped Java class representing this relation called ValueToParent, with two fields called "valueRef" and "parentRef". Then I would try doing something like this: Code: select valueRef from ValueToParent where parentRef.id in (:parent_ids) group by ... |
12. Criteria query: How to match inside a Set ? forum.hibernate.orgI have looked at the documentation, but I could not find a similiar example..... I have a User class and a UserValue class. User.java public Set |
13. Querying collections to match a given set of values forum.hibernate.orgThanks for the reply. I tried that but still, it doesn't solve my issue. In my issue, I want to select the Owner object which has maching tags (String) for all of the Strings which I specify as parameters. For example, If I specify A,B,C as parameters, it should give me the set of Owner objects which has A, B and ... |
14. HQL for finding all elements matching a subset? forum.hibernate.orgHi! I have a class File with a collection Keywords. How can I do a search for all files matching a every keyword given in a search? So for instance, if my search query was: hello goodbye, I'd have some pseudo HQL like: from Files f where ('hello', 'goodbye') all in elements(f.keywords) Any decent way for me to do this? Thanks ... |