Write SQL query in Java action in Mendix

0
I have developed one java action which is helpful for developing big reports. I hope, writing sql is fine in Mendix.  
asked
2 answers
0

Yes, it is, but it is risking the database to become corrupt. With creating a read, you will not harm the database, so that is fine. But for creating a read, OQL is the better choice as query-language to use. It is easier and more compact compared to SQL and is meant for read only. No write options.

When you use SQL to create objects, you will have to be very careful to give it the correct id, which will have to comply with Mendix’ way of generating the id, and you will have to prevent writing to objects that Mendix is writing to at the same time.

answered
0

if you worked in my company, it is a big NO.

 

Liston to Tim and use the OQL, and be aware that you are skipping all acces control to data. So make sure you only mimic security this in your queries.

answered