Giter Site home page Giter Site logo

Comments (6)

stefan-niedermann avatar stefan-niedermann commented on May 12, 2024

fyi @desperateCoder creating boards with

Board b = new Board();
b.setTitle(boardName);
syncManager.createBoard(account.getId(), b);

causes currently this exception:

2019-03-22 11:48:58.844 16513-16556/it.niedermann.nextcloud.deck E/AndroidRuntime: FATAL EXCEPTION: Thread-10
    Process: it.niedermann.nextcloud.deck, PID: 16513
    android.database.sqlite.SQLiteConstraintException: FOREIGN KEY constraint failed (code 787 SQLITE_CONSTRAINT_FOREIGNKEY)
        at android.database.sqlite.SQLiteConnection.nativeExecuteForLastInsertedRowId(Native Method)
        at android.database.sqlite.SQLiteConnection.executeForLastInsertedRowId(SQLiteConnection.java:796)
        at android.database.sqlite.SQLiteSession.executeForLastInsertedRowId(SQLiteSession.java:788)
        at android.database.sqlite.SQLiteStatement.executeInsert(SQLiteStatement.java:86)
        at androidx.sqlite.db.framework.FrameworkSQLiteStatement.executeInsert(FrameworkSQLiteStatement.java:51)
        at androidx.room.EntityInsertionAdapter.insertAndReturnId(EntityInsertionAdapter.java:114)
        at it.niedermann.nextcloud.deck.persistence.sync.adapters.db.dao.BoardDao_Impl.insert(BoardDao_Impl.java:186)
        at it.niedermann.nextcloud.deck.persistence.sync.adapters.db.dao.BoardDao_Impl.insert(BoardDao_Impl.java:32)
        at it.niedermann.nextcloud.deck.persistence.sync.adapters.db.DataBaseAdapter.createBoardDirectly(DataBaseAdapter.java:252)
        at it.niedermann.nextcloud.deck.persistence.sync.helpers.providers.BoardDataProvider.createInDB(BoardDataProvider.java:34)
        at it.niedermann.nextcloud.deck.persistence.sync.helpers.providers.BoardDataProvider.createInDB(BoardDataProvider.java:15)
        at it.niedermann.nextcloud.deck.persistence.sync.helpers.DataPropagationHelper.createEntity(DataPropagationHelper.java:22)
        at it.niedermann.nextcloud.deck.persistence.sync.SyncManager.lambda$createBoard$1(SyncManager.java:163)
        at it.niedermann.nextcloud.deck.persistence.sync.-$$Lambda$SyncManager$Ck_yhv6TIQA6kbdYHFxUQiT27R8.run(Unknown Source:6)
        at java.lang.Thread.run(Thread.java:764)
2019-03-22 11:48:58.853 16513-16556/it.niedermann.nextcloud.deck I/Process: Sending signal. PID: 16513 SIG: 9

from nextcloud-deck.

desperateCoder avatar desperateCoder commented on May 12, 2024

The combination of Account ID and remote Id already exists. Do you set the remote Id? That would be a bad idea. Don't set any ID!

If this is not the case: what data exactly do you want to save? Post a json or stuff.

from nextcloud-deck.

AndyScherzinger avatar AndyScherzinger commented on May 12, 2024

Nice work 👍

from nextcloud-deck.

stefan-niedermann avatar stefan-niedermann commented on May 12, 2024

Iam not very happy with it, code-wise it's a bit dirty. But it works for now and we can refactor it at a later point...

from nextcloud-deck.

AndyScherzinger avatar AndyScherzinger commented on May 12, 2024

Sounds good, refactoring at a later time shouldn't be an issue :)

from nextcloud-deck.

stefan-niedermann avatar stefan-niedermann commented on May 12, 2024

Refactored in 7df89b4 4b40b78 7a8f475 7a8f475 476df50 b87d140 79aa5d9 80fffd4

from nextcloud-deck.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.