Message Boards
7.1GA4 serviceBuilder convert-null not working, empty string becomes null
7.1GA4 serviceBuilder convert-null not working, empty string becomes null
New Member Posts: 2 Join Date: 9/28/21 Recent PostsHello,
Liferay 7.1 service builder ignores convert-null setting for a column in service.xml , when trying to update model having one attribute as "" empty string , the i get exception : ERROR [http-nio-8080-exec-1][JDBCExceptionReporter:234] Cannot insert the value NULL into column 'sow_link', table 'client_proposal_details'; column does not allow nulls. UPDATE fails.
Why does service buikder convert attirubite with "" to NULL on persist ? I have MySql5.7 in backend. sow_link is not NULL column. I don't want to insert " " then have to trim on all fetch before comapre.
This is working perfecting in 6.2 , found similar question but no working solution so reposting in hope of a answer with our combined wisdom and knowldege as Liferay community.
TIA.