Working with MYSQL ViewWorking with MYSQL Viewhttps://liferay.dev/en/c/message_boards/find_thread?p_l_id=119785333&threadId=1173915692024-03-29T05:56:41Z2024-03-29T05:56:41ZRE: Working with MYSQL ViewOlaf Kockhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1174044662019-10-08T13:09:37Z2019-10-08T13:09:37Zwell, using ServiceBuilder is <em>one</em> option. If you go with ServiceBuilder, it <em>can</em> create the tables for you, but you can also provide them yourself. You're also free to go with any other database access technology if you feel more familiar with it (or have existing code to interface with it). <br />If you decide that you take care of the database tables yourself, but still go with ServiceBuilder, you might be limited to reading from the VIEWS. And you shouldn't write to one table, then read the same data from views without noting that ServiceBuilder might abstract away some caches for you.<br />If you really want to use your views, you might be better off with classic JDBC access. But the question is: What do you use them for? In case it's performance: Have you measured if it indeed makes a difference?Olaf Kock2019-10-08T13:09:37ZRE: Working with MYSQL ViewDavide del Vecchiohttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1174000642019-10-08T12:35:57Z2019-10-08T12:35:57ZFrom what I've understood, usually a Liferay project is composed of one or more MVC-portlet and one Service module.<br />Reading the docs I've seen that the usualĀ way to work with databases is via "service.xml" and *ServiceImpl classes.<br />In that way, when I run the "buildService" gradle task new declared tables are generated in the database.At this point I only need to eventually write custom getter in the *ServiceImpl class with DynamicQuery if needed.<br /><br />All this to separate business logic from database logic.<br /><br />Knowing this, I'm askingĀ if there is something built in the Liferay framework to work with Views or I shoud put SQL calls wherever I think is right.<br /><br />Hope this explain a bit,<br />Thank you.Davide del Vecchio2019-10-08T12:35:57ZRE: Working with MYSQL ViewOlaf Kockhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1173976372019-10-08T08:17:59Z2019-10-08T08:17:59Z<html><head></head><body><div class="quote-title">Davide del Vecchio:</div><blockquote><br>Hi, how can I use msyql views with Liferay 7.1?<br></blockquote>I don't understand...<br><pre><code>SELECT * from MY_VIEW ...
</code></pre></body></html>Olaf Kock2019-10-08T08:17:59ZWorking with MYSQL ViewDavide del Vecchiohttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1173915682019-