1. how to query specific fields in hibernate criteria stackoverflow.comI need to fetch only specific feilds instead of all fields. All my tables has audit feilds(4) . i want that to be ommitted on the selection. how to do that ... |
2. Refering to an earlier aliased field in a criteria query stackoverflow.comIn this query:
|
3. org.hibernate.Criteria: field ROOT_ENTITY not found coderanch.com |
4. Hibernate Criteria query for matching on fields of related objects? coderanch.com |
5. Querying fields from superclass entity on Hibernate Criteria forum.hibernate.orgNewbie Joined: Tue Apr 13, 2010 6:14 pm Posts: 6 Location: El Salvador Hi to all, i have a little issue with Hibernate Criteria. I have 2 entities, one is the super entity of another, as you can see: Code: public class ComTiendas implements java.io.Serializable { private long idtda; private ... |
6. Criteria Restrictions - could not get a field value by forum.hibernate.orgHi, I have following DetachedQuery: Code: DetachedCriteria criteria = DetachedCriteria.forClass(Project.class, "project"); criteria.createAlias("status","projectStatus", CriteriaSpecification.LEFT_JOIN); criteria.createAlias("priority","projectPriority", CriteriaSpecification.LEFT_JOIN); criteria.createAlias("type","projectType", CriteriaSpecification.LEFT_JOIN); criteria.createAlias("account","projectAccount", CriteriaSpecification.LEFT_JOIN); criteria.createAlias("owner","projectOwner", CriteriaSpecification.LEFT_JOIN); criteria.setProjection( ... |
7. Criteria CONCAT fields... forum.hibernate.orgHow i can concanete some fields with criteria API ? sql example: select * from person where concat(person.firstName,' ',person.middleName,' ',person.lastName) like '%aPerson%' i try something like this... but doesn't work... Criteria criteria = session.createCriteria(Person.class); criteria.add(Expression.ilike("firstName middleName lastName ", keyWord)); criteria.list(); org.hibernate.QueryException: could not resolve property: firstName middleName lastName of: br.usp.lsi.contact.Person tnx... Markus Reichel |
8. calculated field in criteria? forum.hibernate.orgHi there I would like to find a calculated field inside my DetachedCriteria query and return it as part of the result. For example: I have an end date and a start date and I want to calculate the duration between the two (the exact field is not in the database object) I have not been able to do this - ... |
9. Criteria not working with many-to-many field forum.hibernate.org@Entity public class Asset extends Basic { // Fields @Id private Long id; @ManyToOne private Users validatedByUser; @ManyToMany(targetEntity = Business.class) @JoinTable(name = "ASSET_BUSINESSES", joinColumns = { @JoinColumn(name = "ASSETID") }, inverseJoinColumns = { @JoinColumn(name = "BUSINESSID") }) ... |
10. Sybase Bit Field, Criteria forum.hibernate.org |
11. Hibernate Criteria: concatenate field to a constant forum.hibernate.org |