liquibase-mongodb icon indicating copy to clipboard operation
liquibase-mongodb copied to clipboard

Save the identifier in a property after inserting or creating a property with the result of a search with projection

Open daniquir opened this issue 2 years ago • 0 comments

After executing an insert I need to get the generated id to include it in a later insert It would be possible to create a property with a query and projection or to be able to store the generated id after an insert The idea is to be able to manually create a reference used by spring-data-jpa-mongodb in the post insert of the type:

"FIELD" : { "$ref" : "REFERENCED_COLLECTION", "$id" : ObjectId("5ab140fbf14cbd85f2258bce") }

In sql there is an option to use valueComputed directly in the values or even create properties with queries Would something like this be possible for liquibase-mongodb?

daniquir avatar Aug 03 '22 17:08 daniquir