element « Data Type « JPA Q&A





1. Hibernate Criteria API equivalent for "elements()"    stackoverflow.com

Is it possible to implement the following query using Criteria API?

select order from ORDER as order,ITEM as item 
where item.itemID like 'ITM_01' and item in elements(order.items)

2. Getting all objects with a certain element inside a collection of strings with criteria API    stackoverflow.com

I'm trying to build a Hibernate Criteria query to find entities that have a specific element inside a collection. We can take as an example a Book -object that looks like this:

public ...

3. Hibernate Collections - have lots of null elements aswell as my objects    coderanch.com

Hi Here is my XML ....

4. A Collection of UserType elements?    forum.hibernate.org

...

5. 'new' elements in collections (role of hashcode & equals    forum.hibernate.org

Newbie Joined: Sat Dec 27, 2003 12:36 am Posts: 3 Location: Brisbane, Australia I have a design question to do with collections and the identity of entities in the collections of newly created (ie not yet persisted) entities. hbm2java generates hashcode & equals methods based on the identity of the entities, which seems sensible and is what I think I'd like ...

6. Mutable set elements and Object.equals    forum.hibernate.org

hi all, i have a few questions regarding the way that hibernate uses sets and what the best practices are. i have stumbled across a problem that has made me question using sets anymore. i'll give an example - i've got a persistent class Account with a one-to-many relationship with another persistent class Order, here's the mapping:

7. not-null must be declared for element type key-property    forum.hibernate.org

I have a database table that uses 8 columns as a primary key, so I'm declaring a composite-id. Any ideas on what's wrong? I try adding the not-null property, but it didn't make a difference. TIA. Hibernate version: 2.1 Mapping documents: ...

8. not-null" must be declared for element type "id&qu    forum.hibernate.org

why error when run error info: 16:46:52,093 ERROR [XMLHelper] Error parsing XML: XML InputStream(8) Attribute " not-null" must be declared for element type "id". 16:46:52,093 INFO [STDOUT] org.hibernate.MappingException: Error reading resour ce: com/hmit/hub/entity/hbm/Datalog.hbm.xml at org.hibernate.cfg.Configuration.addResource(Configuration.java:449) at org.hibernate.cfg.Configuration.parseMappingElement(Configuration.jav a:1313) at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.jav a:1285) at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1267) at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1234) at org.hibernate.cfg.Configuration.configure(Configuration.java:1162) at com.hmit.hub.entity.db.InitHibernate.init(InitHibernate.java:56) at com.hmit.hub.entity.db.HibernateUtilPlus.getSystemSessionFactory(Hibe rnateUtilPlus.java:129) at com.hmit.hub.entity.db.HibernateUtilPlus.currentSession(HibernateUtil Plus.java:46) at org.jbpm.scheduler.impl.SchedulerThread.executesimple(SchedulerThread .java:77) at org.jbpm.scheduler.impl.SchedulerThread.run(SchedulerThread.java:45) Caused ...

9. Foreign key of a set element is NULL    forum.hibernate.org

Beginner Joined: Tue Oct 18, 2005 10:47 am Posts: 20 Location: Basel Hello everyone ! I'm a bit new to hibernate and have a problem for mapping a list. Here is some description : Problem description : When I try to save an object (WordEN) that contains a Set with only one element (WordFormEN) inside it, the foreign key linking this ...





10. All null elements in my collection    forum.hibernate.org

My problem is that my criteria.list is returning me a collection of the correct size but where all the objects are null. I have no idea of why this is happening. Has anybody ever seen something like this, any help will be greatly appreciated. Thanks. Hibernate version: 3.0 Mapping documents:

11. Elements in Collection Null    forum.hibernate.org

Newbie Joined: Mon Feb 13, 2006 8:10 am Posts: 2 david wrote: Not showing enough information -such as the mapping- for someone to help you. Code:

15. set returns different number of elements    forum.hibernate.org

Hi all, we currently have a some problems using one-to-many and many-to-many associations. We're developing a simple web application which does nothing more than to retrieve an object from the backend and prints out the associated objects in the jsp. Unfortunately this returned list contains a different number of elements, if reloading the page. We currently have no additional caching and ...

16. HQL for all objects which contain an array element?    forum.hibernate.org

Hibernate version: 3.1.3 Mapping documents: Code: ...





17. PersistentMap.readFrom: null element    forum.hibernate.org

public Object readFrom(ResultSet rs, CollectionPersister persister, CollectionAliases descriptor, Object owner) throws HibernateException, SQLException { Object element = persister.readElement( rs, owner, descriptor.getSuffixedElementAliases(), getSession() ); Object index = persister.readIndex( rs, descriptor.getSuffixedIndexAliases(), getSession() ); if ( element!=null ) map.put(index, element); ...

18. second level caching, cache.EhCache Element NULL    forum.hibernate.org

thanks for the reply, i am not sure of session.get and load only i have to use HQL as i cannot have get and load only. But i think that's not a problem as i can see the caching happening only for some case it's null. So i assume max elements is the case i did try increasing that though.. not ...

19. Defining Timestamp Element For More than one column    forum.hibernate.org

hi I have some timestamp columns in the database table I'm trying to insert db generated date in those field but I realized that you can only configure one column using timestamp for current timestamp generation ..is there any other way? More details of the problem :-

20. NULL elements in collection retrieved from DB    forum.hibernate.org

Hi I have found an issue that I am struggling to find a way around. We have a simple class that encapsulates two Double fields. These are themselves stored in a collection (a List) to be stored in the database. What I have found is that if the List contains a single element in which both double fields are 'null', when ...