Commit Graph

744 Commits

Author SHA1 Message Date
ssh24 b229bad2a5 Remove unnecessary line causing validation fail 2017-07-31 16:52:56 -04:00
Biniam Admikew 28d63b8dca Merge pull request #308 from strongloop/fix/instance-status-after-save
Set isNewInstance to undefined for after save hook on replaceOrCreate and updateOrCreate
2017-07-26 22:27:01 -04:00
biniam ad44168d4a isNewInstance undefined for after save hook
Since using REPLACE or INSERT...ON DUPLICATE KEY
statements both give us affected rows of 1 for a
new row or a row which got updated with the same
values, we make isNewInstance undefined on after
save hook for save, replaceOrCreate, and
updateOrCreate methods. Also, disable juggler
tests for that functionality.
2017-07-26 22:21:06 -04:00
Biniam Admikew 461ecf083e Merge pull request #314 from strongloop/update-docs-datatype-flags
Add datatype flags to README
2017-07-26 10:41:44 -04:00
biniam 487f08df88 Add datatype flags to README 2017-07-26 09:51:09 -04:00
Biniam Admikew 94484485b0 Merge pull request #313 from strongloop/update-eslint
upgrade eslint deps
2017-07-25 15:46:27 -04:00
biniam 7a7a34e77f upgrade eslint deps 2017-07-25 15:41:11 -04:00
Diana Lau 5eedce280e Merge pull request #311 from strongloop/add-codeowner
Add CODEOWNER file
2017-07-25 10:43:17 -04:00
Diana Lau 527910123f Add CODEOWNER file 2017-07-24 22:33:06 -04:00
Kevin Delisle 380eadeaf5 5.0.0
* Add DECIMAL to Number prop type (Tetsuo Seto)
 * Fix fk docs to avoid constraint errors (ssh24)
 * Document GeoPoint migration (biniam)
 * Honor user specified datatype on PKs (ssh24)
 * Require init on mocha args (ssh24)
 * Add docs on FK integrity (ssh24)
 * Create database on the docker script (ssh24)
 * Handle null vals properly (biniam)
 * Allow case sensitive regex operation (ssh24)
 * switch long and lat for geopoint type (biniam)
 * discovery.test: fix discoverModels tests (Kevin Delisle)
2017-07-10 09:58:38 -04:00
Tetsuo Seto 853b9f87ab Merge pull request #306 from strongloop/decimal-number
Add DECIMAL to Number prop type
2017-06-27 12:06:25 -07:00
Tetsuo Seto b0ac2509f1 Add DECIMAL to Number prop type 2017-06-26 21:21:50 -07:00
Sakib Hasan 118bf9aee6 Merge pull request #303 from strongloop/fix/fk-docs
Fix foreign key example to avoid constraint errors
2017-06-20 12:23:50 -04:00
ssh24 ce84111111 Fix fk docs to avoid constraint errors 2017-06-20 12:07:36 -04:00
Biniam Admikew 34caec006c Merge pull request #302 from strongloop/doc/geopoint-upgrade
Document GeoPoint migration
2017-06-16 16:04:53 -04:00
biniam 05138d1f06 Document GeoPoint migration 2017-06-16 13:19:51 -04:00
Sakib Hasan c227b22701 Merge pull request #300 from strongloop/fix/allow-user-specific-pk-datatype
Honour user specific pk datatype
2017-06-16 12:29:49 -04:00
ssh24 2ded0f96eb Honor user specified datatype on PKs 2017-06-16 12:25:17 -04:00
Sakib Hasan 881f1584ed Merge pull request #301 from strongloop/fix/require-init
Require init on mocha args
2017-06-16 11:58:10 -04:00
ssh24 5d9f69285d Require init on mocha args 2017-06-16 11:45:39 -04:00
Sakib Hasan 7493df1d68 Merge pull request #299 from strongloop/fix/fk-docs-automigrate
Add docs and example on FK integrity
2017-06-15 14:56:21 -04:00
ssh24 1b0ef42739 Add docs on FK integrity 2017-06-15 13:35:38 -04:00
Sakib Hasan 88a333e4c8 Merge pull request #297 from strongloop/allow-db-creation-docker
Create database on the docker script
2017-06-14 15:39:20 -04:00
ssh24 c68b81cd6a Create database on the docker script 2017-06-14 15:17:52 -04:00
Biniam Admikew cfdcdda192 Merge pull request #288 from strongloop/fix/inq-null-parser
Handle null values in inq properly
2017-06-14 13:13:49 -04:00
biniam 134eeb24e2 Handle null vals properly
When converting null values
to database column values,
return null if column is
nullable, otherwise try
to cast it to the property
type, and if not, return
'null'.
2017-06-14 12:44:25 -04:00
Sakib Hasan 8a197cd147 Merge pull request #293 from strongloop/feature/add-case-sensitive-regex
Add case sensitive regex
2017-06-13 11:16:12 -04:00
ssh24 145d061e94 Allow case sensitive regex operation 2017-06-13 10:18:27 -04:00
Biniam Admikew 4077ae8864 Merge pull request #286 from strongloop/fix/geopoint-orientation
switch long and lat for geopoint type
2017-06-06 09:48:24 -04:00
biniam 3dad2bf4df switch long and lat for geopoint type
MySQL expects reverse order of latitude and longitude
from the way we use it in LoopBack, so switch the order
when saving and loading Point spatial type we use for
Point/GeoPoint.
2017-06-06 08:54:13 -04:00
Kevin Delisle 8dfe41b9b5 Merge pull request #287 from strongloop/enable-discovery-tests
Enable and fix discovery tests
2017-06-05 14:15:39 -04:00
Kevin Delisle c236eb068d discovery.test: fix discoverModels tests 2017-06-05 13:50:46 -04:00
Kevin Delisle 2397141544 4.1.1
* Add http status code translations for errors (Kevin Delisle)
 * Allow explicit data types (ssh24)
 * Revert "switch long and lat for geopoint type" (biniam)
 * switch long and lat for geopoint type (biniam)
 * Escape index names (#280) (Sakib Hasan)
 * Fix docker setup (#279) (Sakib Hasan)
 * Add docker setup (#278) (Sakib Hasan)
 * Adding support for fractional seconds. (Joost de Bruijn)
 * fix compare of foreign keys for autoupdate (#272) (Sergey Nosenko)
 * Update README.md (Antoine LA)
2017-06-01 11:34:54 -04:00
Kevin Delisle 904fa479cf Merge pull request #284 from strongloop/http-error-code-translations
Add http status code translations for errors
2017-05-31 17:08:27 -04:00
Kevin Delisle 7d2f0751f6 Add http status code translations for errors
Errors will now have their status codes set based on the error
message returned by the MySQL driver.
2017-05-31 17:02:09 -04:00
Sakib Hasan b67cd565ec Merge pull request #283 from strongloop/fix/honor-explicit-datatype
Allow explicit data types
2017-05-31 15:14:03 -04:00
ssh24 44083e43c1 Allow explicit data types
Override columnDataType function

Add test cases

Apply feedback

Use date type as explicit datatype
2017-05-31 14:42:53 -04:00
Biniam Admikew fc55994d8c Merge pull request #285 from strongloop/revert/geopoint-orientation
Revert "switch long and lat for geopoint type"
2017-05-31 10:58:34 -04:00
biniam 0187f0434b Revert "switch long and lat for geopoint type"
This reverts commit dd5bfb3f82.
2017-05-31 10:30:00 -04:00
Biniam Admikew 361f7585b0 Merge pull request #282 from strongloop/fix/geopoint-orientation
switch long and lat vals for mysql
2017-05-30 09:43:12 -04:00
biniam dd5bfb3f82 switch long and lat for geopoint type 2017-05-30 09:29:36 -04:00
Sakib Hasan 2ba88203f3 Escape index names (#280)
* Escape index names

* Add test cases
2017-05-19 11:57:06 -04:00
Sakib Hasan 18ddc84929 Fix docker setup (#279)
* Add support for host and database

* Order the optional parameters correctly
2017-05-15 13:38:30 -04:00
Sakib Hasan a45e22eeb8 Add docker setup (#278)
* Add docker setup

Add a setup script that spawns a docker container before running test
Easy for contributors now to test, no need for a local instance

* Update readme with docs on running test

* Allow check for container status

Check for if the container is up before proceeding

* Add options for customized user,pass,port

* Fix seeding on database

Only seed the database if user specifies CI=true
OR when the tests actually run on the CI

* Update readme with windows env var
2017-05-12 10:13:15 -04:00
Janny eefa6813c6 Merge pull request #274 from joostdebruijn/feature/fractional-seconds
Adding support for fractional seconds
2017-05-08 11:04:06 -04:00
Joost de Bruijn c3a336c18d Adding support for fractional seconds. 2017-05-05 19:15:41 -04:00
Sergey Nosenko 72abcb8e9f fix compare of foreign keys for autoupdate (#272)
* fix compare of foreign keys for autoupdate

use mysql table name in case it is not equal model name

* fix column name lookup for fk definition

* fix ADD CONSTRAINT for multiple fk

if more the one foreign key added ADD CONSTRAINT
must be separated with comma but not with space as applySqlChanges do.

* fix duplicate foreign key creation on autoupdate

* fix entity name selection

* change join to toString as requested

* fix removing dropped keys

* fix linter issues

* add test case with columnName in foreign key

and isActual check after autoupdate

* uncommit accitenally commited test case
2017-05-05 19:13:23 -04:00
Diana Lau 204242663e Merge pull request #276 from monsty/patch-1
Update README.md
2017-05-05 10:11:31 -04:00
Antoine LA 41e5811481 Update README.md 2017-05-04 16:48:46 +02:00
Kevin Delisle 57e76e6fc9 4.1.0
* Tests for datetime types (Kevin Delisle)
 * Add new type DateString to fromColumnValue (Buck Bito)
 * Remove String manipulations of Date objects (Buck Bito)
 * Properties with mysql custom "columnName" don't get autoupdated (#273) (Sergey Nosenko)
 * Revert PR #257 (#266) (Sakib Hasan)
 * Fix async.each in migration (#262) (Benjamin Schuster-Boeckler)
 * refactor date, timestamp and datetime data types handling (#257) (Sergey Nosenko)
 * Fix too many connection error (#261) (Sakib Hasan)
2017-05-02 18:35:55 -04:00