ColdBox ORM create new record

Hi,

I'm in trouble with creation of new record with ORM in coldbox.

I have this code, but seems not work properly:

    var rc = event.getCollection();

    var userBean = userService.new(ENTITYNAME="user");

    event.removeValue("id");

    populateModel(model=userBean,exclude="id");

    entitySave(userBean);

    setNextEvent("users.index");

If I made a dump I see that in the entity he put on id property a
strange number like 402881e635f2c2d30135f4e19135008f (it changes every
time I refresh).

Where is my error?

I've tried also with code in coldbox documentation, but it seems
doesn't work also if it's very simple like:

    var user = ormService.new(entityName="user", name="Luis",
email="luis@majano");

    entitySave(user);

    setNextEvent("users.index");

Please could you help me?

Solved!

I have an error in my database dialect config, set to innodb.

I’m a noob on coldbox :smiley: