How to use CONCAT command of MySQL in OFbiz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

How to use CONCAT command of MySQL in OFbiz

kieuanhvu
I want to concatenate 2 fields in 1 table with <view-entity>, so I did as following:
<view-entity entity-name="TestConcat"
            package-name="org.ofbiz.learning">
       <member-entity entity-alias="PA" entity-name="PostalAddress"/>
       <alias-all entity-alias="PA"/>
       <alias name="addressFull">
           <complex-alias operator="||">
              <complex-alias-field entity-alias="PA" field="address1"/>
              <complex-alias-field entity-alias="PA" field="address2"/>
           </complex-alias>
        </alias>
</view-entity>
However, MySQL does not recognize the " || " operator as a string concatenator, this operator will work with Derby or PostgreSQL. How can I concatenate two that fields?