i solved the problem by create custom controller and using core action with query
const user = await strapi.db
.query("plugin::users-permissions.user")
.findOne({
where: { id: userId },
});
if (!user) {
throw new ValidationError("userId title must be defined.");
}
const result = await super.create(ctx);
if (!!result && result?.data) {
await strapi.db.query("api::leave-detail.leave-detail").update({
where: { id: result.data.id },
data: { user: userId },
});
}