Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ARSnova Backend
Manage
Activity
Members
Labels
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Privacy
Imprint
Contact
Snippets
Groups
Projects
Show more breadcrumbs
Paul-Christian Volkmer
ARSnova Backend
Commits
c2757a21
Commit
c2757a21
authored
7 years ago
by
Daniel Gerhardt
Browse files
Options
Downloads
Patches
Plain Diff
Exclude empty ids/revs from serialization for CouchDB
The creation of new documents is blocked if an empty _rev is set.
parent
7a1e6f50
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/de/thm/arsnova/entities/serialization/CouchDbDocumentMixIn.java
+10
-2
10 additions, 2 deletions
.../arsnova/entities/serialization/CouchDbDocumentMixIn.java
with
10 additions
and
2 deletions
src/main/java/de/thm/arsnova/entities/serialization/CouchDbDocumentMixIn.java
+
10
−
2
View file @
c2757a21
...
@@ -18,12 +18,20 @@
...
@@ -18,12 +18,20 @@
package
de.thm.arsnova.entities.serialization
;
package
de.thm.arsnova.entities.serialization
;
import
com.fasterxml.jackson.annotation.JsonIgnoreProperties
;
import
com.fasterxml.jackson.annotation.JsonIgnoreProperties
;
import
com.fasterxml.jackson.annotation.JsonInclude
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
@JsonIgnoreProperties
(
value
=
{
"type"
},
allowGetters
=
true
)
@JsonIgnoreProperties
(
value
=
{
"type"
},
allowGetters
=
true
)
public
abstract
class
CouchDbDocumentMixIn
{
public
abstract
class
CouchDbDocumentMixIn
{
@JsonProperty
(
"_id"
)
abstract
String
getId
();
@JsonProperty
(
"_id"
)
@JsonInclude
(
JsonInclude
.
Include
.
NON_EMPTY
)
abstract
String
getId
();
@JsonProperty
(
"_id"
)
abstract
void
setId
(
String
id
);
@JsonProperty
(
"_id"
)
abstract
void
setId
(
String
id
);
@JsonProperty
(
"_rev"
)
abstract
String
getRevision
();
@JsonProperty
(
"_rev"
)
@JsonInclude
(
JsonInclude
.
Include
.
NON_EMPTY
)
abstract
String
getRevision
();
@JsonProperty
(
"_rev"
)
abstract
String
setRevision
(
String
rev
);
@JsonProperty
(
"_rev"
)
abstract
String
setRevision
(
String
rev
);
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment