<dynamic prepend="WHERE">
<isNotEmpty prepend="AND" property="profileId">
<iterate property="profileId" open="profile_id IN (" close=")" conjunction=", ">
#profileId[]#
</iterate>
</isNotEmpty>
<isNotEmpty prepend="OR" property="nullProfile">
profile_id = 0
</isNotEmpty>
</dynamic>)
<isNotEmpty prepend="AND" property="profileId">
<iterate property="profileId" open="profile_id IN (" close=")" conjunction=", ">
#profileId[]#
</iterate>
</isNotEmpty>
<isNotEmpty prepend="OR" property="nullProfile">
profile_id = 0
</isNotEmpty>
</dynamic>)