question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

DEFAULT schema values and CUSTOM fields not preserved on import/export

See original GitHub issue

OrientDB Version, operating system, or hardware.

  • v2.0 SNAPSHOT[ ] - .18[ ] .17[ ] .16[ ] .15[ ] .14[ ] .13[ ] .12[ ] .11[ ] .10[ ] .9[ ] .8[ ] .7[ ] .6[ ] .5[ ] .4[ ] .3[ ] .2[ ] .1[ ] .0[ ]
  • v2.1 SNAPSHOT[ ] - .16[x] .15[ ] .14[ ] .13[ ] .12[ ] .11[ ] .10[ ] .9[ ] .8[ ] .7[ ] .6[ ] .5[ ] .4[ ] .3[ ] .2[ ] .1[ ] .0[ ]
  • v2.2 SNAPSHOT[ ] - .rc1[ ] .beta2[ ] .beta1[ ]

Operating System

  • Linux
  • MacOSX
  • Windows
  • Other Unix
  • Other, name?

Expected behavior and actual behavior

Expected: exporting a database, then importing the same file into a new database preserves field DEFAULT values.

Actual: the imported database has no DEFAULT values on any fields.

Steps to reproduce the problem

create database remote:localhost:2424/test_defaults <user> <pass> memory graph

create class V1 extends V
create property V1.id String
create property V1.name String
alter property V1.name default 'default_here'
create vertex V1 set id='1'
select name from V1 where id='1'

> ----+------+------------
> #   |@CLASS|name        
> ----+------+------------
> 0   |null  |default_here
> ----+------+------------

export database /tmp/data.zip

###

create database remote:localhost/test_defaults2 <user> <pass> memory graph
import database /tmp/data.zip.gz

select name from V1 where id='1'

> ----+------+------------
> #   |@CLASS|name        
> ----+------+------------
> 0   |null  |default_here
> ----+------+------------

create vertex V1 set id='2'
select name from V1 where id='2'

> ----+------
> #   |@CLASS
> ----+------
> 0   |null  
> ----+------

Note how the last insert should have created a “name” column with value “default_here”, but the select shows no such column exists.

Unrelated bug: note that the syntax for IMPORT DATABASE and EXPORT DATABASE is inconsistent – IMPORT DATABASE requires a filename including its extension, while EXPORT DATABASE tacks .gz onto whatever filename is passed in.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:25 (21 by maintainers)

github_iconTop GitHub Comments

1reaction
tglmancommented, Aug 4, 2016

hi, I just ported the fix in 2.1.x should be released in 2.1.21

Regards

0reactions
obi1kenobicommented, Sep 12, 2016

Thanks, looking forward to 2.2.10 getting released!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Custom fields with default values are not updating...
We have encountered issues where customfields have the same name but are of a different type so it doesn't update them.
Read more >
Custom Address Fields Requirements and Limitations
To export data stored in custom fields of type Address, use API or SOQL queries. Bulk API doesn't support the export of custom...
Read more >
Column Mappings (SQL Server Import and Export Wizard)
Before you map columns, you must ignore all columns that will not be mapped. Type View the data type for the destination column...
Read more >
How to Export Advanced Custom Fields (ACF) - WP All Import
This article provides step-by-step instructions to export Advanced Custom Fields. It also has a table of contents for all exportable fields.
Read more >
Import sets properties - ServiceNow Docs
Schema map for tables ... Prepare to left-pad number fields in custom tables ... Default currency values in import and export.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found