Picture2 has been toggled from true to false, Picture1 and Pictuire3 remain as they were (false)Īnswer Checked By - Clifford M. The result being :- D/DBINFO_STAGE1: Picture is Picture1 Title is Picture1 isFavorite is falseĭ/DBINFO_STAGE1: Picture is Picture2 Title is Picture2 isFavorite is trueĭ/DBINFO_STAGE1: Picture is Picture3 Title is Picture3 isFavorite is falseĭ/DBINFO_STAGE2: Picture is Picture1 Title is Picture1 isFavorite is falseĭ/DBINFO_STAGE2: Picture is Picture2 Title is Picture2 isFavorite is falseĭ/DBINFO_STAGE2: Picture is Picture3 Title is Picture3 isFavorite is false edge can't be inserted before vertix Issue 6011 arangodb/arangodb GitHub arangodb arangodb Public Notifications Fork 798 Star 12. Log.d("DBINFO_$tagSuffix","Picture is $") ĭao.insert(PictureEntity("Picture1","Picture1","TheURL",false))ĭao.insert(PictureEntity("Picture2","Picture2","TheURL",true))ĭao.insert(PictureEntity("Picture3","Picture3","TheURL",false)) Both are emitted by the traversal as we know: FOR endVertex. You should be using something like:- pictureEntity SET isFavorite = NOT isFavorite WHERE id=:id")Īs an example consider the following snippet :-. We can easily add filter conditions for the end vertex and/or the edge which leads to it. Furthermore, you have no clause limiting the update to a specific row, therefore it would toggle ALL rows in the table. You have the wrong table name, it is, according to the provided code, pictureEntity. That's how the convenience works, it finds the appropriate row according to the primary key and updates all of the other columns. I am using this dao query but it is updating all the fields for isFavorite column. I will appreciate any help to get me back on track. I am totally lost and can't find any way around this issue. I tried this query too but I got an error: picture_table SET isFavorite = NOT isFavorite") What I want is to just update one single field for the picture which has been selected favorite. Suspend fun updatePicture(picture: PictureEntity) I am using this dao query but it is updating all the fields for isFavorite column. Plus 3 extra AQL INSERT statements for each relation to insert in an edge collection (referencing the key and existing doc id's) Not sure if multi docs are allowed with this type of INSERT. I am looking to toggle the boolean value of isFavorite field when a user hits the Mark/Unmark favorite button in the UI for that particular picture item's isFavorite field This is my Picture Entity class: class id: String, I am working on a picture app where I have a list of pictures entities cached in a ROOM database:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |