Skip to main content

If we have a custom sync rule joining the task table,  all the task columns are set NULL (in mobile DB) if not specified in the attributes to extract.  


Below if the Initial query for the table. 


<hierarchy_select>
  <primary_table>c_task_journal</primary_table>
  <attrs>
    <attr>c_task_journal.*</attr>
  </attrs>
  <from>
    <table>c_task_journal</table>
    <table>task</table>
  </from>
  <where>
    <data_constraint>
      <constraint>
        <left_operand>task.person_id</left_operand>
        <operator>eq</operator>
        <right_operand>{PERSON_ID}</right_operand>
      </constraint>
    </data_constraint>
    <join_constraint>
      <constraint>
        <left_operand>c_task_journal.task_id</left_operand>
        <operator>equi</operator>
        <right_operand>task.task_id</right_operand>
      </constraint>
    </join_constraint>
  </where>
</hierarchy_select>

 

And if we don't add     <attr>task.*</attr>  , the task table values are overridden to NULL..

 

Is this an expected behaviour?

Hi @TDCSOURABH,

Yes, I would expect that to occur.

Is there a reason that this table is not added to the Task table sync instead of doing it this way around?

Kind regards,

Lee Pinchbeck


Ok.  It is also added in the sync rule for TASK table, and in the initial query for c_task_journal.  (Both)

Do you have any information about the execution order of the SYNC rules ?  

 

 


Hi @TDCSOURABH,

They should be in one sync rule or the other but not both. If you check the mobile log files that will show you the order in which the system works through the sync rules.

Kind regards,

Lee Pinchbeck