ufront / ufront-orm

The Object Relational Mapper, allows easy, type-safe access to your database. Builds on Haxe's SPOD but adds macro powered relationships, validation and client side usage
MIT License
13 stars 4 forks source link

[PHP] id may not be NULL #15

Closed theRemix closed 9 years ago

theRemix commented 9 years ago
#### NEKO TEST
assertations: 1
successes: 1
errors: 0
failures: 0
warnings: 0
execution time: 0.004

results: ALL TESTS OK (success: true)
TestDemo
  test_saving_page: OK .

#### PHP TEST
assertations: 1
successes: 0
errors: 1
failures: 0
warnings: 0
execution time: 0.017
script time: 0.459

results: SOME TESTS FAILURES (success: false)
TestDemo
  test_saving_page: ERROR E
    Error while executing INSERT INTO Page (created,modified,title) VALUES ('2014-12-27 02:51:36', '2014-12-27 02:51:36', 'a new page') (NOT NULL constraint failed: Page.id)

not sure what's going on here, neko seems to be adding the id field and passing tests as expected, however php is not working as expected.

https://github.com/theRemix/ufront-orm-demo/commit/c8d057a34358dbb75ce640fb08be37156094953e

theRemix commented 9 years ago

Ok i tested this out using the latest Haxe build (3.2.0)
utest - 1.3.2
ufront-orm - 1.0.0-rc.8
and php5
id field is fine, and tests from https://github.com/theRemix/ufront-orm-demo/commit/780971bc4af974076ade97aef80ef3144bf881e3 pass

i pushed a docker image for testing with these versions theremix/ufront-orm

root@coreos's password: 
--------- Neko Test ---------

assertations: 1
successes: 1
errors: 0
failures: 0
warnings: 0
execution time: 0.235

results: ALL TESTS OK (success: true)
TestDemo
  test_saving_page: OK .
--------- PHP Test ---------

assertations: 1
successes: 1
errors: 0
failures: 0
warnings: 0
execution time: 0.158
script time: 0.766

results: ALL TESTS OK (success: true)
TestDemo
  test_saving_page: OK .