Hi,
I want to make database request (for my personnal data), but I don’t know how I can access to database connection or method to manage it.
And this is not any documentation about it.
How to do ?
And, I have another question :
How to use “created_on”, “created_by” … values and not create my own column which does the same things ?
Best regards.
siddique
(Siddique Ahmad)
Octobre 10, 2020, 9:28
#2
using axelor or directly?
Using Axelor configuration and database connection
matthias
(Matthias)
Octobre 12, 2020, 7:11
#4
I do it like that
Connection connection = DriverManager.getConnection("jdbc:postgresql://localhost:5432/axelor", "axelor", "axelor");
sqlQuery="INSERT INTO base_logiciel (type_logiciel, version_majeur) VALUES (?,?)";
prepare = connection.prepareStatement(sqlQuery);
prepare.setLong(1, idtypelog);
prepare.setString(2, versionmaj);
prepare.executeUpdate();
Ok so you don’t use Axelor connection ?
It was to use the same DB configuration, to don’t hardcode username and passwd.
siddique
(Siddique Ahmad)
Octobre 13, 2020, 8:52
#6
you want to add new model ?
Use DB directly is to edit the data juste before save it, or to do another update when edit an object.
siddique
(Siddique Ahmad)
Octobre 15, 2020, 3:07
#8
for that there is entity listener available
we are using cdc based on debezium to call external services
1 « J'aime »
system
(system)
A fermé ce sujet ()
Novembre 14, 2020, 3:07
#9
Ce sujet a été automatiquement fermé après 30 jours. Aucune réponse n’est permise dorénavant.