Posts

Showing posts with the label service bulider

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 . <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!!!

service bulider(service.xml) column types

When ever your are writing the service.xml , you may have doubts what type the liferay supports. Here we go,   Take look at the servicebulider class and method getSqlType(-,-,-) . So whenever you have to define data Type have a glance at this class.  Refer the " com.liferay.portal.tools.servicebuilder.dependencies " package what columns , Tables will allowed to add in the service.xml. bad_table_names.txt - Refer the this txt file what table names to be avoided. bad_column_names.txt - Refer this to be avoided the column name. Also refer the .ftl how they are generated the files.