Removing prefix value for table created by service builder
In Liferay , Whenever we are writing the service bulider we specify the "namespace" in service.xml so that table will be created as prefix namespace.
If you look into the below service.xml , In DB it creates as test_library.
If you want to remove the prefix while creating the table in DB. we need to keep auto-namespace-tables = "false".
<service-builder package-path="com.test" auto-namespace-tables="false">
Thats it!!!
If you look into the below service.xml , In DB it creates as test_library.
<service-builder package-path="com.test">
<author>BNG</author>
<namespace>test</namespace>
<entity name="library" local-service="true" remote-service="false">
<column name="libraryId" type="long" primary="true" />
----------------
</entity>
</service-builder>
If you want to remove the prefix while creating the table in DB. we need to keep auto-namespace-tables = "false".
<service-builder package-path="com.test" auto-namespace-tables="false">
Thats it!!!
Comments
Post a Comment