enonic / xp

Enonic XP
https://enonic.com
GNU General Public License v3.0
201 stars 34 forks source link

Allow custom node id #4887

Open ComLock opened 7 years ago

ComLock commented 7 years ago

repoConnection.create({ _id: 'whatever' }) Even though you specify which id a node should have, it gets an autogenerated one.

There is an example which seems to indicate non random id on create, however the nodeId is only shown in the expected result, not when calling the create method: https://github.com/enonic/xp/blob/29b329d8538f8f31e0ffecfd00f2d53553b1284c/modules/lib/lib-node/src/main/resources/site/lib/xp/examples/node/create-2.js#L77

runarmyklebust commented 7 years ago

We cant open up for setting id's until version 7.0 - since we have issues here with id's being lowercased "behind the scenes" when creating nodes, but not when doing searches (this is due to keep backward compatibility with existing data with non-lowercased ids)

rymsha commented 3 years ago

Example doesn't indicate ability to set of on create, since it is in result and it is still "random" Not a bug. Could be a feature.

rymsha commented 1 year ago

Java API supports custom id