Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Foreign keys with null values causes NPE in applyRelatedDSRequest

    I am currently running SmartGwt Pro latest 3.1 patch.
    I am using DMI DataSources with foreignKey definitions and IncludeFrom field.
    When the foreignKey value is null, the applyRelatedDSRequest() method fails with
    Code:
    dsRequest.execute() failed: 
    java.lang.NullPointerException
    	at com.isomorphic.datasource.DSRequest.applyRelatedDSRequest(DSRequest.java:4227)
    	at com.isomorphic.datasource.DSRequest.fetchRelatedValues(DSRequest.java:4134)
    	at com.isomorphic.datasource.DSRequest.execute(DSRequest.java:2043)
    	at com.isomorphic.servlet.IDACall.handleDSRequest(IDACall.java:216)
    I would have preferred if the includeFrom-processing could be skipped for the particular records with foreign key null values.
    Is this possible?
    Regards Hans Petter Simonsen - Evry Norway

    #2
    Would Isomorphic care to comment? While these issues are not showstoppers, I would rather have that I did not have to code workarounds for these issues.

    Comment


      #3
      I'm from Isomorphic and working on issues you reported. Will inform you as soon as these are fixed.

      Comment


        #4
        Fix is committed. You can download next nightly build and try it out.

        Note, that default joinType is "inner", so if value for FK field is null that record will be removed from dataSet. You need to set joinType="outer" on FK field to make it appear in dataSet.

        Comment


          #5
          Thanks,
          I won't be able to test it quite yet, but I'll get back to you.

          Comment

          Working...
          X