Я хотел бы сделать CRUD, но у меня есть проблема в моей переменной SortieA это NULL?См. Рисунок здесь => введите описание изображения здесь
Это проблема в моем альбоме класса?
public class Album {
private String codeA;
private String titreA;
private Date sortieA;
private Chanteur chanteurAlb;
public Album() {
}
public Album(String codeA, String titreA, Date sortieA, Chanteur chanteurAlb) {
this.codeA = codeA;
this.titreA = titreA;
this.sortieA = sortieA;
this.chanteurAlb = chanteurAlb;
}
public String getCodeA() {
return codeA;
}
public void setCodeA(String codeA) {
this.codeA = codeA;
}
public String getTitreA() {
return titreA;
}
public void setTitreA(String titreA) {
this.titreA = titreA;
}
public Date getSortieA() {
return sortieA;
}
public void setSortieA(Date sortieA) {
this.sortieA = sortieA;
}
public Chanteur getChanteurAlb() {
return chanteurAlb;
}
public void setChanteurAlb(Chanteur chanteurAlb) {
this.chanteurAlb = chanteurAlb;
}
Вот мой запрос
public boolean insertAlbum (Album alb)
{
boolean ok = ConnexionMySQL.getInstance().actionQuery("Insert into album (CodeA, TitreA, SortieA, IdentC) values ('" + alb.getCodeA() + "','" + alb.getTitreA() +
"'," + alb.getSortieA() + "," + alb.getChanteurAlb().getIdentC() + ")");
return ok;
}
У вас есть идея, пожалуйста?
введите описание изображения здесь