Class ComputedColumnsTest


  • public class ComputedColumnsTest
    extends OBBaseTest
    Set of tests for computed columns lazy loading
    Author:
    alostale
    • Constructor Detail

      • ComputedColumnsTest

        public ComputedColumnsTest()
    • Method Detail

      • testLazyLoad

        public void testLazyLoad()
        Tests computed columns are lazily loaded
      • testComputedColumnHQLFilter

        public void testComputedColumnHQLFilter()
        Test it is possible to filter in HQL by computed columns accessing them through the proxy.

        Note this way of filtering is potentially harmful in terms of performance because computed column need to be calculated in order to do the filtering.

      • testComputedColumnCriteriaFilter

        public void testComputedColumnCriteriaFilter()
        Tests computed columns can not be used in OBCriteria
      • testComputedColumnHQLFilterOldWay

        public void testComputedColumnHQLFilterOldWay()
        Direct access to computed columns in HQL was allowed prior to MP27, now it is not anymore and proxy needs to be used.
      • testJSONConverter

        public void testJSONConverter()
                               throws org.codehaus.jettison.json.JSONException
        Tests issue #25862 Computed columns for a new object should be null when converting to JSON
        Throws:
        org.codehaus.jettison.json.JSONException