Bonjour,
Je crée un objet SELECT comme j’ai l’habitude sur la 3.0 avec un attribut clé technique qui s’appelle SecESPRIAppId et je fais ma requête (très simple sans jointure pour l’instant) dans le postlaod :
BCSISecESPRI.postLoad = function() {
var sql =“SELECT row_id as sec_espri_app_id,”+
" app_irn,"+
" app_short_name,"+
" app_long_name,"+
" app_desc,"+
" app_domain,"+
" app_sub_domain,"+
" app_type,"+
" app_sub_type,"+
" app_state,"+
" app_scope,"+
" app_it_support,"+
" app_department,"+
" app_dev_ext,"+
" app_dspi_scope,"+
" app_criticality,"+
" app_reactivity,"+
" app_rto,"+
" app_rpo,"+
" app_slr,"+
" app_sla"+
" FROM bcsi_app";
this.setSearchSpec(sql);
};
Quand je fais le test, il fait bien le count (j’ai bien le nombre total d’enregistrements de la recherche selon mes critères) mais à l’affichage j’ai aucune ligne et j’ai cette erreur :
SIMPLICITE|http://server-simplicite-tomcat-ope-compute-bf32a:8080||ECOREDB001|system|com.simplicite.util.engine.ObjectManager|query||Erreur SQL requête: select * from (SELECT row_id as sec_espri_app_id, app_irn, app_short_name, app_long_name, app_desc, app_domain, app_sub_domain, app_type, app_sub_type, app_state, app_scope, app_it_support, app_department, app_dev_ext, app_dspi_scope, app_criticality, app_reactivity, app_rto, app_rpo, app_slr, app_sla FROM bcsi_app) t where (1=1) order by t.row_id asc limit 20
java.sql.SQLSyntaxErrorException: user lacks privilege or object not found: T.ROW_ID
Quand j’essaie la requête qui pose problème toute seule sur la console db :
select * from (SELECT row_id as sec_espri_app_id, app_irn, app_short_name, app_long_name, app_desc, app_domain, app_sub_domain, app_type, app_sub_type, app_state, app_scope, app_it_support, app_department, app_dev_ext, app_dspi_scope, app_criticality, app_reactivity, app_rto, app_rpo, app_slr, app_sla FROM bcsi_app) t where (1=1) order by t.row_id asc limit 20
ça ne marche pas non plus sauf quand je retire le “as sec_espri_app_id” i.e. avec ça :
select * from (SELECT row_id, app_irn, app_short_name, app_long_name, app_desc, app_domain, app_sub_domain, app_type, app_sub_type, app_state, app_scope, app_it_support, app_department, app_dev_ext, app_dspi_scope, app_criticality, app_reactivity, app_rto, app_rpo, app_slr, app_sla FROM bcsi_app) t where (1=1) order by t.row_id asc limit 20
Et là ça marche donc je me dis je vais faire la même modification dans mon objet SELECT :
BCSISecESPRI.postLoad = function() {
var sql =“SELECT row_id,”+
" app_irn,"+
" app_short_name,"+
" app_long_name,"+
" app_desc,"+
" app_domain,"+
" app_sub_domain,"+
" app_type,"+
" app_sub_type,"+
" app_state,"+
" app_scope,"+
" app_it_support,"+
" app_department,"+
" app_dev_ext,"+
" app_dspi_scope,"+
" app_criticality,"+
" app_reactivity,"+
" app_rto,"+
" app_rpo,"+
" app_slr,"+
" app_sla"+
" FROM bcsi_app";
this.setSearchSpec(sql);
};
Et là je tombe sur une Erreur 500.
De mémoire, sur la 3.0 ça marchait bien avec le “as …”.
Est ce qu’il y a eu des changements sur la 3.2 qui expliquent cela?
En vous remerciant.
Zouhair