search « Map « JPA Q&A





1. Hibernate Search Annotations not Inherited    stackoverflow.com

I am indexing a class whose superclass has the following annotations:

@Indexed
@Entity
@Inheritance(strategy = InheritanceType.JOINED)
The same @Inheritance annotation is on the subclass. The annotations of the superclass are all on methods. ...

2. Hibernate inheritance search    stackoverflow.com

I will try to summarize my question. I have a base class "Base" with three properties. Four classes inherit from it - "A", "B", "C" and "D". They add their own ...

3. HQL search within child SET with IN keyword    stackoverflow.com

i really can not find enough documentation on hibernate IN keyword, when applied on search within a collection of some object. I have strange problem, I have a hql query:

  ...

4. Hibernate HQL to search a map    stackoverflow.com

In the java Hibernate, how to write a HQL to search a map value based on key , the code like

obj.paymentMap[cash].payDate >= :fromDate
what is the correct syntax ? Thanks

5. Hibernate Search field mapping    stackoverflow.com

The Hibernate Search @Field annotation gives the option to choose index name for a property:

...
@Field(name="somethingOrOther")
public String getSomeValue() {
...
The user guide says this about the name property of the @Field annotation:
...

6. hibernate search problem w/ entity inheritance    coderanch.com

I am using hibernate-search 3.0.1.GA. I am trying to create an index with entities that inherit off a base entity; Here is the main entity I want to store the id in the index. It has many text items. The text item has two child classes on child has a varchar the other has a clob. I want to index the ...

7. Hibernate Search - Searching a term in manytomany collection    forum.hibernate.org

When I search for some term that is in a collection, is returned only the objects that have just this term. But if the collection have mor than one object this don't work. Example. A book have two authors and another book have only one author. Then when I looking for the book that have only one author like "author:Jack" this ...

8. criteria search for @ManyToMany    forum.hibernate.org

hi! i have the following problem .. i have two classes mapped like this classA { @Id @Column(name = "someCol") Long id; @ManyToMany(fetch = FetchType.LAZY) @JoinTable(name = "jointable", joinColumns = { @JoinColumn(name = "colA") }, inverseJoinColumns = { @JoinColumn(name = "colB") }) List list; } if i do f.ex. a getById() for classA everything works fine. i get the instance with ...





10. Inheritance, HQL and searching by overriden properties    forum.hibernate.org

Hi, I have following problem, there are several Code: @MappedSuperclass abstract class Base { TID id; T data; @Transient abstract getId(); @Transient abstract getData; } @Entity() @Table(...) @Inheritance(strategy = SIMPLE_TABLE) @SequenceGenerator(...) @DiscriminatorColumn(name = "type", discriminatorType = DiscriminatorType.INTEGER) abstract class Value extends Base { ...

11. HQL search query in hash map with like    forum.hibernate.org

10:15:29.091 WARN org.hibernate.util.JDBCExceptionReporter - SQL Error: -5581, SQLState: 42581 10:15:29.091 ERROR org.hibernate.util.JDBCExceptionReporter - unexpected token: SELECT javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not execute query at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1235) at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1168) [...] Caused by: org.hibernate.exception.SQLGrammarException: could not execute query at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:92) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66) ...

12. HQL (Searching) for "Any" type mappings    forum.hibernate.org

Folks, I would like to search "Requisition" via Client's attribute (e.g. code). This should be a simple one, however, I haven't been able to find any information about this, anyone can help? ... ... Thanks in ...

13. Mapping / search problem - please help    forum.hibernate.org

Beginner Joined: Thu Jun 30, 2005 5:07 am Posts: 33 Hi, I have Class Employee and class EmployeeRootParam. they are in many to many relationship. EmployeeRootParam has ParamType class with boolean member name enabled and userViewRight as Integer. I try to find all the EmployeeRootParam that has ParamType.enabled equal true and userViewRight greater than 2. I use the query as follow: ...

14. criteria search on a collection of mapped enums    forum.hibernate.org

Mapping documents: Code: ...

15. How to apply search criteria to child collection?    forum.hibernate.org

Hello, I have the following situation: I have a parent table (say, OWNER), and a child table (say, CAR). I'd like to select all owners who have red honda civic, and only those children that describe a red honda civic entry. Here's my Hibernate hierarchy: Owner { String name; Set cars; } //Car class has many-to-one link to Owner Car { ...

16. Mapping MySQL Text type for FullText search    forum.hibernate.org

Hi, I've a problem with a MySQL query fulltext to search a word into a text field on DB.. If I set the field as VARCHAR 255, all works very well, but I need more than 255 chars for this field, so cannot use VARCHAR.... If I use TEXT with 500 char, I receive "org.hibernate.MappingException: No Dialect mapping for JDBC type: ...





17. MySQL Fulltext Search over an Inheritance hierarchy    forum.hibernate.org

Hi, I'm running hibernate 3.2 and mysql 5.0.26. I'd like to leverage mysql's fulltext search features. I'd like to map a object hierarchy of around 20 classes with a maximum depth of 4. Currently I have one table for the hierarchy which is fine, as the classes do not have that many different properties, but I could also change that if ...

18. Search with inheritance objects problem    forum.hibernate.org

Hi guys. I'm using Hibernate 3.2.2 with annotations. My app required object inheritance for some of our objects, and we opted on joined inheritance type. The problem is that the root object of the inheritance tree is the most importante object of the system, having 6 subclasses, and the subs with lots of attributes. I'm building a search method for this ...

20. Searching in sub-child collections    forum.hibernate.org

Hello! I'm stuck on this kind of a rough problem. Suppose, I have a collection called aItems, which consist of objects each having a collection of bItems. Like a grandmother and grandchildren relation really. So, I can search aItems by querying (HQL): from sometable as st where st.aItems.name = somevalue However, would like to do something like: from sometable as st ...