The setter is not even called.
this is my select that is showed by hibernate:
Code:
INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/DepoMan] has already been started
name: name passwd:pa
Hibernate: select * from employs as empl where empl.name = 'name' and empl.passwd = 'pa';
Hibernate: select * from goodtypes;
Hibernate: select good0_.ID as ID2_1_, good0_.goodType_ID as goodType3_2_1_, good0_.NAME as NAME2_1_, goodtype1_.ID as ID3_0_, goodtype1_.DESCRIPTION as DESCRIPT2_3_0_, goodtype1_.NAME as NAME3_0_ from GOODS good0_ left outer join GOODTYPES goodtype1_ on good0_.goodType_ID=goodtype1_.ID where good0_.goodType_ID=?
Hibernate: select good0_.ID as ID2_1_, good0_.goodType_ID as goodType3_2_1_, good0_.NAME as NAME2_1_, goodtype1_.ID as ID3_0_, goodtype1_.DESCRIPTION as DESCRIPT2_3_0_, goodtype1_.NAME as NAME3_0_ from GOODS good0_ left outer join GOODTYPES goodtype1_ on good0_.goodType_ID=goodtype1_.ID where good0_.goodType_ID=?
Hibernate: select good0_.ID as ID2_1_, good0_.goodType_ID as goodType3_2_1_, good0_.NAME as NAME2_1_, goodtype1_.ID as ID3_0_, goodtype1_.DESCRIPTION as DESCRIPT2_3_0_, goodtype1_.NAME as NAME3_0_ from GOODS good0_ left outer join GOODTYPES goodtype1_ on good0_.goodType_ID=goodtype1_.ID where good0_.goodType_ID=?
Getter: null
Getter: null
Getter: null
Hibernate: select * from goodtypes gts where gts.name = 'vopsea';
Hibernate: select good0_.ID as ID2_1_, good0_.goodType_ID as goodType3_2_1_, good0_.NAME as NAME2_1_, goodtype1_.ID as ID3_0_, goodtype1_.DESCRIPTION as DESCRIPT2_3_0_, goodtype1_.NAME as NAME3_0_ from GOODS good0_ left outer join GOODTYPES goodtype1_ on good0_.goodType_ID=goodtype1_.ID where good0_.goodType_ID=?
ps: i can't figure out the hibernate select, my intention is to have a bean of type 'good' that has a property of type 'goodType'. In the GoodType bean i have mapped this:
Code:
@OneToOne(mappedBy = "goodType")
private Good good;
and in the 'good' bean i have:
Code:
@OneToOne
private GoodType goodType;
As fare as i know this is ok 
and my full bean is this:
Code:
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
@Entity
@Table(name = "GOODS")
public class Good implements Serializable {
@Id
@GeneratedValue(strategy = GenerationType.AUTO, generator = "myGen")
@SequenceGenerator(name = "myGen", sequenceName = "goods_id_seq")
@Column(name = "ID")
private Long id;
@Column(name = "NAME")
private String name;
@OneToOne
private GoodType goodType;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public GoodType getGoodType() {
System.out.println("Getter: "+goodType);
return goodType;
}
public void setGoodType(GoodType goodType) {
System.out.println("Setter: "+goodType);
this.goodType = goodType;
}
}
I suppose that the setter is not called because the submit state is not passed and it does not get to the point to bind the values to the g1 var and then persist it. So I am stuck at the submit and the convert step. I can't figure this out what is the problem
. I have set the
Code:
<context-param>
<param-name>facelets.DEVELOPMENT</param-name>
<param-value>true</param-value>
</context-param>
but nothing is thrown in the page...
thanks for the quick replay.