About equals

61-70 of 115Refresh
JPA Doc
4

nullif(x, y)

Method javax.persistence.criteria.CriteriaBuilder Expression nullif(   Expression x,   Expression y ) Create an expression that tests whether its argument are equal, returning null if they are and the value of the first expression if they are not. Parameters: x - expression y - expression Returns: nullif expression Since: JPA 2.0
JDO Doc
4

removeFetchGroups(groups)

. Removed FetchGroups become unscoped. Match is based on identical class and equal name. The methods
Forum
4

Problem witch CriteriaBuilder isMember(..)

of Objects of Testclass in Container (equal and hash methods in Testclass are implemented). My problem ... .>get("testlist2")); works as expected. the equal-query Testclass searchobject = new Testclass(1,2); Predicate predicate = cb.equal(a_root.get("testobject"), searchobject
Forum
4

Should derived fields of an EmbeddedId be manually maintained by app code?

; this.cont = parent; } @Override public boolean equals(Object o) { if(!(o instanceof ... ; return cont.equals(other.cont) && cachedKey.equals(other.cachedKey); } @Override public ... ; } @Override public boolean equals(Object o) { if(!(o instanceof ECompoundKeyMapSubItemId)) return
Forum
3

Help with 'not like/lower' query

= root.get(property.getFieldName()); Predicate predicate; if(property.getOperator().equals ... .getOperator().equals(Operator.NOT_LIKE)){ predicate = criteriaBuilder.notLike(criteriaBuilder.lower(path ... ()); }else if(property.getOperator().equals(Operator.EQUAL)){ predicate = criteriaBuilder.equal(path
Forum
3

Object as parameter results in exception

Hi,    I've got a simple JPA2 Criteria query which fails when doing an object equality. I verified ... .equal(p.get("id"), primaryKey),     qb.and(qb.equal(p.get("owningCompany"), company ... .from(managedClass);   c.select(p);   c.where(     qb.equal(p.get("id"), primaryKey),     qb.and(qb
Forum
3

CriteriaQuery .where() for multiple conditions

.equal(root.get("name"), name)); criteriaQuery.where(criteriaBuilder.equal(root.get("surname ... where name is equal to the given name OR surname is equal to the given surname. Is it possible to make ... = criteriaBuilder.and(criteriaBuilder.equal(root.get("name"), name), criteriaBuilder.equal(root
Forum
3

Apparent Lazy Loading issues.

to be two more. First, as we are dealing with maps, the "equals" and "hashcode" methods on the key ... with this is, when "find" is called, the object is being lazy loaded. So if the "equals" or "hashcode" method ... at the output from the second junit test, you will see heaps of calls like: AttributeName EQUALS method
Forum
3

EntityManager JPA or JDO impl and different behavior

. However there appear to be two more. First, as we are dealing with maps, the "equals" and "hashcode" methods ... . The issue with this is, when "find" is called, the object is being lazy loaded. So if the "equals" or ... EQUALS method called for against:
Forum
2

Field not persisted in abstract class with two level of nesting

) {         super(v);     }     @Override     public boolean equals(Object obj) {         TZ1 x = (TZ1) obj;         return (x.value == null ? value == null : x.value.equals(value ... );     }     @Override     public boolean equals(Object obj) {         TZ2 x = (TZ2) obj