1. double inner join using Criteria.createAlias forum.hibernate.orgi'd like to accomplish something like the HQL: from Cat cat inner join cat.kittens as kittens0 inner join cat.kittens as kittens1 where kittens0.name = 'Fred' and kittens1.name = 'Amy' which would find cats that have at least two kittens, one named fred and another amy. is this possible with the current criteria api? i've tried: Criteria.createCriteria (Cat.class) .createAlias ("kittens", "kittens0").add (Expression.eq ... |
2. createAlias() not producing appropriate join forum.hibernate.orgWondering if anyone has encountered this issue as of yet. Unless I am missing something the Criteria.createAlias() is not creating the appropriate inner join when trying to associate on an Object within a primary key. For example, given identical mappings the following in HQL Code: Query q = session.createQuery("from " + PriceDetail.class.getName() + " pd inner join pd.id." + PriceDetailPK.PRICE_PROPERTY ... |
3. cirteria.createAlias and outer join, bug or not ? forum.hibernate.org/** * * @hibernate.class table="BS" * * @author eboudrant */ public class Bs implements Serializable { private Mx mx; ... /** * @hibernate.one-to-one * class="com.bnpparibas.eqd.msl.eai.monitoring.Mx" */ public Mx getMx() { ... |
4. createAlias() and Criteria API force inner joins forum.hibernate.orgI have run into an issue using the Criteria API that I believe to be the same as discussed in this thread: http://forum.hibernate.org/viewtopic.php?t=934119 and this JIRA issue: http://opensource.atlassian.com/projects/hibernate/browse/HB-1206 I am trying to perform an outer join using Criteria, but as soon as I introduce an alias via createAlias(), the left outer joins are forced to inner joins... Code between sessionFactory.openSession() and ... |
5. Using createAlias to specify a filter on deeply nested join forum.hibernate.orgHi RE: Problems using createAlias to specify a filter on deeply nested join. I'm using createAlias to query on a fairly extensive table structure and I'd like to know if it's possible to use the createAlias method to specify where clauses for tables joined more than one table away. In object terms something like the following is required. Hibernate objects (for ... |
6. createAlias() causes two joins with same table name forum.hibernate.orgI have the following mapping objects: @Entity(name = "Dialable") @Inheritance(strategy = InheritanceType.SINGLE_TABLE) @DiscriminatorColumn( name = "DialableType", discriminatorType = DiscriminatorType.STRING ) @DiscriminatorValue("Dialable") @Table(name = "cmn_dialable", uniqueConstraints = {@UniqueConstraint(columnNames = {"dialableString", "domain_id"})}) @Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE) public abstract class Dialable { ...} @Entity(name = "PhoneNumber") @DiscriminatorValue("PhoneNumber") @AttributeOverride(name="name", column = @Column(unique = true)) public class PhoneNumber extends Dialable { protected Domain domain; @ManyToOne(cascade = CascadeType.REFRESH, ... |