simov / express-admin

MySQL, MariaDB, PostgreSQL, SQLite admin for Node.js
MIT License
1.17k stars 223 forks source link

Add or edit an entry doesn't work #108

Closed carlosfaria94 closed 8 years ago

carlosfaria94 commented 8 years ago

Hi,

I'm having a strange behavior. I'm using PostgresSQL and Node 4.4 and simply trying to add or edit an entry. And it's returned a successful message: "Success: The record have been saved." but nothing it's added or edited in database. With -l flag it's returned a insert that I copy and directly execute in database, and voila, I finally successful insert the entry with SQL returned by the log.

So, what may be happening?

Thanks!

simov commented 8 years ago

If the record isn't saved for some reason you should receive back some error message from the database.

carlosfaria94 commented 8 years ago

But in the fact I’m not receiving back the error message. Maybe the user hasn't a full permission? But he is the owner of the database..

It’s a really weird behavior.

No dia 30/03/2016, às 07:59, simo notifications@github.com escreveu:

If the record isn't saved for some reason you should receive back some error message from the database.

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/simov/express-admin/issues/108#issuecomment-203280276

simov commented 8 years ago

You can try the examples first. They should be working, so you can compare your configuration with the one found in the examples.

carlosfaria94 commented 8 years ago

Ok.. I try the example, and I obtain the same behavior that I had.. For example, it's returned a successful message: "Success: The record have been saved." and log: tbl insert into "public"."item" ("name","description","image") values ('Test','test','test') returning "id" ;, but nothing its aded.

So, I go to database and execute above sql and works now: http://i.imgur.com/YbcP0V5.png

I'm using PostgreSQL 9.4

simov commented 8 years ago

What flags do you pass to the admin? Copy/paste the command that you are using here.

carlosfaria94 commented 8 years ago

admin -v -l config/pg/

simov commented 8 years ago

Remove -v and try again On Mar 30, 2016 6:09 PM, "Carlos Faria" notifications@github.com wrote:

admin -v -l config/pg/

— You are receiving this because you commented. Reply to this email directly or view it on GitHub

carlosfaria94 commented 8 years ago

It's working! Why -v flag interferes?

Thanks!

simov commented 8 years ago

That's stated in the docs:

The -v flag that you're passing to the Express Admin app means that you are running the admin in development mode. In this mode the authentication and the database record updates are disabled.

Though almost at the bottom :)

carlosfaria94 commented 8 years ago

Ups. Sry, I haven't read the last sentence.