Now that I am done with my what took a lot of my time recently, I will be on the road for pretty much the whole month of november all over Europe to spread the word.
First and foremost, I will inaugurate the new MarsJUG (in Marseille) on October 15th. I will be talking about Hibernate Search and how to implement clever full-text search engines using approximations (phonetic approximation etc).
I will also be speaking in Munich at the W-JAX conference on November 10th and 11th. This time I will cover:
- Bean Validation (JSR-303) and Hibernate Validator 4 (just released)
- What's new in Java Persistence 2.0. I will spend a good chunk of it to explain the new type-safe Criteria API
- Hibernate Search and how to do full-text searches with Hibernate-based applications
Next in line is Devoxx where I will give a university talk on Hibernate Search. If you want to know everything about Hibernate Search, this is the time! This is November 17th in the afternoon. This is an interesting format (3 hours), where i will cover a bunch of what is in my book Hibernate Search in Action and do a handful of demonstrations.
Last but not least, I will be speaking at JavaEdge '09 on November 16th in Israel. This time about Bean Validation and Hibernate 4.
If you come by these cities at the right time, come and join me! Between one of these conferences is my birthday :o)
Edit: I forgot that I will be speaking at the ParisJUG on December 8th about Bean Validation. Right after a healthy debate on Spring vs EE 6 (I heard that extra medics and blood supply have been planned)
6 comments:
And you will be talking at the Paris JUG about Bean Validation on the 8th of december ;o)
Hi ,
in regards to bean validation framework JSR 303 and hibernate validator wanted to know what was the status of JSR 303 and whether any changes to hibernate validator in new release was going to be applied to JSR 303?
thanks,
javed
Hi Javed,
Bean Validation has been sent to the JCP for final approval so is frozen.
Hibernate Validator is also final. What feature are you talking about that were in HV and not in Bean Validation?
"What's new in Java Persistence 2.0. I will spend a good chunk of it to explain the new type-safe Criteria API"
=> Will it be possible to manage the following mapping ?
because if I try to query it :
Criteria crit = super.getSession().createCriteria(TA.class);
crit.createAlias("TE", "trk");
crit.add(Restrictions.like("trk.id", "%"));
I get :
select ...............
from TA this_
inner join TE1 trk1_ on this_.TE_ENTITY_FK=trk1_.TE_KEY
inner join TE2 trk1_ on this_.TE_ENTITY_FK=trk1_.TE_KEY
where trk1_.TE_KEY like ?
ORA-00918: column ambiguously defined.
Thank you ORM !
@Entity
@Inheritance(strategy=InheritanceType.TABLE_PER_CLASS)
public abstract class TE {
@Id
@GenericGenerator(name = "idGenerator", strategy = "assigned")
@GeneratedValue(generator = "idGenerator")
@Column(name="TE_KEY")
private String id;
@OneToMany
@JoinColumn(name="TA_KEY", referencedColumnName="TE_KEY", insertable=false, updatable=false)
private List< TA > taList;
}
@Entity
public class TE1 extends TE {
}
@Entity
public class TE2 extends TE {
}
@Entity
@Inheritance(strategy=InheritanceType.SINGLE_TABLE)
@DiscriminatorColumn(name="ta_type")
public abstract class TA {
@Id
@GenericGenerator(name = "idGenerator", strategy = "assigned")
@GeneratedValue(generator = "idGenerator")
@Column(name="TA_KEY")
private String id;
public abstract void setTE(TE TE);
public abstract TE getTE();
}
@Entity
@DiscriminatorValue("TE1")
public class TA1 extends TA {
@ManyToOne(targetEntity=TE1.class)
@JoinColumn(name="TE_ENTITY_FK")
private TE TE;
public TE getTE() {
return TE;
}
public void setTE(TE TE) {
this.TE = TE;
}
}
@Entity
@DiscriminatorValue("TE2")
public class TA2 extends TA {
@ManyToOne(targetEntity=TE2.class)
@JoinColumn(name="TE_ENTITY_FK")
private TE TE;
public TE getTE() {
return TE;
}
public void setTE(TE TE) {
this.TE = TE;
}
}
=>In others words Cat and Dog inherit Pet. CatOwner and DogOwner inherit Owner. A Cat has a CatOwner. A Dog has a DogOwner. When fetching all Cat and Dog (All Pets), I want to inner join fetch CatOwner for Cat and DogOwner for Dog.
=> select p from Pet ...
must return query like this :
select ...............
from Pet this_
inner join CatOwner catowner1_ on this_.OWNER_FK=catowner1_.KEY
inner join DogOwner dogowner1_ on this_.OWNER_FK=dogowner1_.KEY
I don't want to have something like this :
select ...............
from Pet this_
inner join (select ... DogOwner union CatOwner) owner_ on owner_.KEY = this_.OWNER_FK
=> It has very bad performance ! For each Pet record, Hibernate generates an SQL UNION between all Owner subclasses to select the right Owner. Suppose Owner is a big table per class inheritance tree...(with 100 000 rows in each table)
Post a Comment