Hi everyone,
I have installed Play! 1.2.5 and siena 2.0.7 and when I try to perform a search the following error occurs:
org.h2.jdbc.JdbcSQLException: Error creando ├│ inicializando trigger "FT_SPORT_TYPES" objeto, clase "siena.jdbc.h2.FullText$FullTextTrigger", causa:
"java.sql.SQLException: Column not found: landmark_id"; vea la causa raiz para mas detalle
Error creating or initializing trigger "FT_SPORT_TYPES" object, class "siena.jdbc.h2.FullText$FullTextTrigger", cause: "java.sql.SQLException: Column not found: landmark_id"; see root cause for details; SQL stat
ement:
CREATE TRIGGER IF NOT EXISTS "PUBLIC"."FT_SPORT_TYPES" AFTER INSERT, UPDATE, DELETE ON "PUBLIC"."SPORT_TYPES" FOR EACH ROW CALL "siena.jdbc.h2.FullText$FullTextTrigger" [90043-166])
I leave the class below with the data model and the method that generates the error is searchByName:
@Table("sport_types")
public class SportType extends EnhancedModel {
@Exclude
@Column("type_id")
@Id(Generator.AUTO_INCREMENT)
public Long id;
@Required
@Column("type_name")
@Index("type_name_index")
public String name = "";
@Referenced
public Landmark defaultLandmark;
@Referenced
public Landmark promotedLandmark;
// Search by name
public static List<SportType> searchByName(String name, int page, int rowsPerPage) {
return SportType.all().search(name, "name").fetch(rowsPerPage, (page - 1) * rowsPerPage);
}
}
@Table("landmarks")
public class Landmark extends EnhancedModel {
...
@Exclude
@Column("landmark_id")
@Id(Generator.AUTO_INCREMENT)
public Long id;
// standard & promoted
@Column("landmark_category")
@Index("landmark_category_index")
public String category;
@Column("landmark_icon_name")
public String iconName;
@Column("landmark_icon_path")
public String iconPath;
...
}
Thanks in advance,
Antonio