In my Liferay 7 project, the Service Builder generates well the file tables.sql (with the complete sql) but doesn't include this content in the SERVICECOMPONENT native liferay table as it did for Liferay 6.2.
Therefore, when I restart the server, there is no update in the database whereas the data model has been modified.
I have to run manually the sql script included in tables.sql to solve temporarily the issue.
Does someone has reproduced this ? Is there any option (new in Liferay 7 ?) that I didn't know which can lead to this behavior.
Note : Of course, the option build.auto.upgrade (in service.properties) is set to true and there is no service-ext.properties which could override this
Liferay Community has updated the post adding steps to this post,
While you’re developing your application, you can force your service tables to regenerate when you modify them by following these steps:
Here’s an example in SQL:
DROP TABLE LRBO_HORSE_HORSE;
DELETE FROM SERVICECOMPONENT WHERE BUILDNAMESPACE = 'LRBO_HORSE';
DELETE FROM RELEASE_ WHERE SERVLETCONTEXTNAME = 'horse-service';
Follow this link for more details,
Thanks Daniele Baggio for giving pointers.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With