What are the best practices for handling RDBMS table relationships. We usually c

What are the best practices for handling RDBMS table relationships. We usually create CDTs to map with our tables and in case there are multiple tables associated with each other we create nested CDTs.

My questions is more around mapping the inter related tables with nested CDTs using annotations with Lazy loading enabled. As Appian uses hibernate in the backend it should support lazy loading but I have seen whole object graph is fetched in process variables even if nested CDTs are configured as lazy loading enabled. In case lazy loading isn't supported in the process variables what are the best practice to model the nested CDTs in this case ?

Please let me know.

OriginalPostID-161380

OriginalPostID-161380

  Discussion posts and replies are publicly visible

Parents
  • @tim.clarke I totally missed the fetch type annotation is not listed in supported annotation list.

    Right now what we are doing is if object graph is not lengthy than we are using annotations to handle the mapping, in case there are several inter related objects than we handle the mapping ourselves by adding foreign keys as mentioned by @rajat.

    Obviously in second case handling mapping manually, its pain in the neck because from database write,read to render the data on UI requires a whole lot of efforts as you need to write everything. Anyway we don't have any other option for it.


    @stefan Sorry but I am not in full agreement of creating sub CDT (used to hold subset of all columns in master CDT) you have mentioned or it might be possible that the example is not the best fit here. For the projection on CDT columns we are using queryEntity as it provides more control also its easy to maintain in case we need to add or remove any column based on requirement from queryentity expression rather than modifying the sub CDT itself. Please let me know if I am on wrong track here.

    Thanks all for your answers.
Reply
  • @tim.clarke I totally missed the fetch type annotation is not listed in supported annotation list.

    Right now what we are doing is if object graph is not lengthy than we are using annotations to handle the mapping, in case there are several inter related objects than we handle the mapping ourselves by adding foreign keys as mentioned by @rajat.

    Obviously in second case handling mapping manually, its pain in the neck because from database write,read to render the data on UI requires a whole lot of efforts as you need to write everything. Anyway we don't have any other option for it.


    @stefan Sorry but I am not in full agreement of creating sub CDT (used to hold subset of all columns in master CDT) you have mentioned or it might be possible that the example is not the best fit here. For the projection on CDT columns we are using queryEntity as it provides more control also its easy to maintain in case we need to add or remove any column based on requirement from queryentity expression rather than modifying the sub CDT itself. Please let me know if I am on wrong track here.

    Thanks all for your answers.
Children
No Data