Last active
August 29, 2015 14:17
-
-
Save oznus/c00516b4659ff191b723 to your computer and use it in GitHub Desktop.
Saving Couchbase Lite document
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Document userDocument = database.createDocument(); | |
| List<String> emails = new ArrayList<String>() {{ | |
| add("some_mail_1@gmai.com"); | |
| add("some_mail_2@gmai.com"); | |
| } | |
| }; | |
| Map<String, Object> userMapper = new HashMap<>(); | |
| userMapper.put("name", "Justin"); | |
| userMapper.put("sureName", "Timberlake"); | |
| userMapper.put("description", "I like to write songs"); | |
| userMapper.put("emails",emails); | |
| try { | |
| userDocument.putProperties(userMapper); | |
| } catch (CouchbaseLiteException e) { | |
| Log.d(TAG,e.getMessage()); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment