opened
Ivanov-Yuriy
username_0
if you create a field of type EMBEDDEDLIST and linkedtype date,
you can write wrong value in min max fields.
DB will react to this and return an error but put the wrong value into the field.
After that DB will return error to any query until you correct the error in MIN MAX field.

## Steps to reproduce the problem

orientdb {db=trick}> **create class test extends V**
Class created successfully. Total classes in database now: 11.

orientdb {db=trick}> **create property test.el embeddedlist date**
Property created successfully with id=1.

- _insert wrong value_

orientdb {db=trick}> **alter property test.el max 2016-05-25**
Error: com.orientechnologies.orient.core.exception.OCommandExecutionException: Error on execution of command: sql.alter property test.el max 2016-05-25
        Storage URL="plocal:D:/orientdb-community-2.2.0/databases/trick"
        Storage URL="plocal:D:/orientdb-community-2.2.0/databases/trick"
Error: java.lang.NumberFormatException: For input string: "2016 - 5 - 25"

orientdb {db=trick}> **create property test.s string**
Error: com.orientechnologies.orient.core.exception.OCommandExecutionException: Error on execution of command: sql.create property test.s string
        Storage URL="plocal:D:/orientdb-community-2.2.0/databases/trick"
        Storage URL="plocal:D:/orientdb-community-2.2.0/databases/trick"
Error: java.lang.NumberFormatException: For input string: "2016 - 5 - 25"

orientdb {db=trick}> **create property test.s2 string**
Error: com.orientechnologies.orient.core.exception.OCommandExecutionException: Error on execution of command: sql.create property test.s2 string
        Storage URL="plocal:D:/orientdb-community-2.2.0/databases/trick"
        Storage URL="plocal:D:/orientdb-community-2.2.0/databases/trick"
Error: java.lang.NumberFormatException: For input string: "2016 - 5 - 25"

- but queries were executed

orientdb {db=trick}> **select expand(properties)  from ( select expand(classes) from metadata:schema) where name = 'test'**

+----+----+----+--------+---------+--------+-------+------------+----+-------------+------+----------+------------+---
|#   |name|type|globalId|mandatory|readonly|notNull|defaultValue|min |max|  regexp |linkedType| 
+----+----+----+--------+---------+--------+-------+------------+----+-------------+------+----------+------------+---
|0   |el  |10  |23      |false    |false   |false  |            |    |2016 - 5 - 25|      |19        |            |default|           |
|1   |s   |7   |24      |false    |false   |false  |            |    |             |      |          |            |default|           |
|2   |s2  |7   |25      |false    |false   |false  |            |    |             |      |          |            |default|           |
+----+----+----+--------+---------+--------+-------+------------+----+-------------+------+----------+------------+---
3 item(s) found. Query executed in 0.01 sec(s).

orientdb {db=trick}> **alter property test.el max 20**
Property updated successfully.

orientdb {db=trick}> **create property test.s3 string**
Property created successfully with id=4.

## Important Questions

### Runninng Mode
- [ ] Embedded, using PLOCAL access mode



### OrientDB Version
- [ ] v2.1.16
- [ ] v2.2.0

### Operating System

- [ ] Windows
Error in EMBEDDED of type DATE with wrong MIN MAX value
issue
created
lvca
username_1
On v2.2 I've tried executing

alter property TestWrongMax.dates max 2016-05-25

And the MAX has been set with 1986, because it's the result of the expression `2016-05-25`.

Use rather `alter property TestWrongMax.dates max '2016-05-25'`
comment
closed
lvca
username_1
issue