Reputation: 37
Where are tables that generated database by Liferay through service.xml?. I don't see it in my Postgres. There are so many tables, I tried to find it but it not found. Anyone can help me, thanks
Upvotes: 0
Views: 65
Reputation: 48067
Unless you explicitly specify the table name in the entities that you declare in service.xml, the table names are constructed with the namespace and entity name.
<service-builder package-path="com.liferay.docs.guestbook">
<namespace>GB</namespace>
<entity name="Guestbook" local-service="true" uuid="true">
...
would generate GB_Guestbook
as table name.
From the very well documented DTD:
<namespace>
The namespace element must be a unique namespace for this component. Table names will be prepended with this namespace. Generated JSON JavaScript will be scoped to this namespace as well (i.e., Liferay.Service.Test.* if the namespace is Test).
<entity>
Child of service-builderAn entity usually represents a business facade and a table in the database. If an entity does not have any columns, then it only represents a business facade. The Service Builder will always generate an empty business facade POJO if it does not exist. Upon subsequent generations, the Service Builder will check to see if the business facade already exists. If it exists and has additional methods, then the Service Builder will also update the SOAP wrappers.
If an entity does have columns, then the value object, the POJO class that is mapped to the database, and other persistence utilities are also generated based on the order and finder elements.
...
(and you'll find more hints, e.g. explicit table names, in that document)
Notes:
Upvotes: 1