java.sql.SQLException: Field \'parent_id\' is of data type null which can not be compared

ormlite | *anonymous | 5 years ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    Problem with self referencing Class

    ormlite | 5 years ago | *anonymous
    java.sql.SQLException: Field \'parent_id\' is of data type null which can not be compared

    Root Cause Analysis

    1. java.sql.SQLException

      Field \'parent_id\' is of data type null which can not be compared

      at com.j256.ormlite.stmt.query.BaseComparison.<init>()
    2. ORMLite Core
      Where.isNull
      1. com.j256.ormlite.stmt.query.BaseComparison.<init>(BaseComparison.java:25)
      2. com.j256.ormlite.stmt.query.IsNull.<init>(IsNull.java:19)
      3. com.j256.ormlite.stmt.Where.isNull(Where.java:299)
      3 frames
    3. com.example.ormlitetest
      ORMLiteTestActivity.loadDataCached
      1. com.example.ormlitetest.ORMLiteTestActivity.query(ORMLiteTestActivity.java:135)
      2. com.example.ormlitetest.ORMLiteTestActivity.loadDataCached(ORMLiteTestActivity.java:94)
      2 frames
    4. Java RT
      Method.invoke
      1. java.lang.reflect.Method.invokeNative(Native Method)
      2. java.lang.reflect.Method.invoke(Method.java:521)
      2 frames
    5. Android Platform
      ActivityThread.main
      1. android.view.View$1.onClick(View.java:2067)
      2. android.view.View.performClick(View.java:2408)
      3. android.view.View$PerformClick.run(View.java:8816)
      4. android.os.Handler.handleCallback(Handler.java:587)
      5. android.os.Handler.dispatchMessage(Handler.java:92)
      6. android.os.Looper.loop(Looper.java:123)
      7. android.app.ActivityThread.main(ActivityThread.java:4627)
      7 frames
    6. Java RT
      Method.invoke
      1. java.lang.reflect.Method.invokeNative(Native Method)
      2. java.lang.reflect.Method.invoke(Method.java:521)
      2 frames
    7. Android
      ZygoteInit.main
      1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
      2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
      2 frames
    8. Android Platform
      NativeStart.main
      1. dalvik.system.NativeStart.main(Native Method)
      1 frame