<![CDATA[select t1.* from (SELECT (SELECT ARRAY_TO_JSON(ARRAY_AGG(T.*)) FROM (SELECT M2.ID AS SRFKEY, M2.NAME AS SRFMAJORTEXT FROM RES_PARTNER_RES_PARTNER_CATEGORY_REL M1 LEFT JOIN RES_PARTNER_CATEGORY M2 ON M1.CATEGORY_ID = M2.ID WHERE M1.PARTNER_ID =T1.ID ) T) AS CATEGORY_ID, t1.EMAIL, t1.FUNCTION, t1.ID, t1.MOBILE, t1.NAME, t1.PHONE, t1.TYPE, t1.VAT FROM RES_PARTNER t1 ) t1 where id=#{id}]]>
<![CDATA[select t1.* from (SELECT (SELECT ARRAY_TO_JSON(ARRAY_AGG(T.*)) FROM (SELECT M2.ID AS SRFKEY, M2.NAME AS SRFMAJORTEXT FROM RES_PARTNER_RES_PARTNER_CATEGORY_REL M1 LEFT JOIN RES_PARTNER_CATEGORY M2 ON M1.CATEGORY_ID = M2.ID WHERE M1.PARTNER_ID =T1.ID ) T) AS CATEGORY_ID, t1.EMAIL, t1.FUNCTION, t1.ID, t1.MOBILE, t1.NAME, t1.PHONE, t1.PROPERTY_SUPPLIER_PAYMENT_TERM_ID, t1.TYPE, t1.VAT FROM RES_PARTNER t1 ) t1 where id=#{id}]]>
<![CDATA[ SELECT (SELECT ARRAY_TO_JSON(ARRAY_AGG(T.*)) FROM (SELECT M2.ID AS SRFKEY, M2.NAME AS SRFMAJORTEXT FROM RES_PARTNER_RES_PARTNER_CATEGORY_REL M1 LEFT JOIN RES_PARTNER_CATEGORY M2 ON M1.CATEGORY_ID = M2.ID WHERE M1.PARTNER_ID =T1.ID ) T) AS CATEGORY_ID, t1.EMAIL, t1.FUNCTION, t1.ID, t1.MOBILE, t1.NAME, t1.PHONE, t1.TYPE, t1.VAT FROM RES_PARTNER t1
<![CDATA[ SELECT (SELECT ARRAY_TO_JSON(ARRAY_AGG(T.*)) FROM (SELECT M2.ID AS SRFKEY, M2.NAME AS SRFMAJORTEXT FROM RES_PARTNER_RES_PARTNER_CATEGORY_REL M1 LEFT JOIN RES_PARTNER_CATEGORY M2 ON M1.CATEGORY_ID = M2.ID WHERE M1.PARTNER_ID =T1.ID ) T) AS CATEGORY_ID, t1.EMAIL, t1.FUNCTION, t1.ID, t1.MOBILE, t1.NAME, t1.PHONE, t1.PROPERTY_SUPPLIER_PAYMENT_TERM_ID, t1.TYPE, t1.VAT FROM RES_PARTNER t1