question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Question: how to do returning * with save?

See original GitHub issue

Is there a way to do:

Model.forge({ params }).save(null, { returning: "*" }) 

Which would be like:

insert into models (keys) values (values) returning *

I can’t see a way to map options from model.save to knex.insert.

Thanks for taking a look.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

6reactions
aj0strowcommented, Jan 8, 2016

Yeah, went with using Knex directly and removed Bookshelf from the project.

0reactions
ricardogracacommented, Jan 8, 2016

Closing this due to lack of activity and because there are already other issues covering this functionality.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Will forms save responses so that a student may return to it the ...
Just circling back on this thread to let you know that you can now save your response in a form and submit later,...
Read more >
How to write a return policy: The 5 questions you need to answer
How to write a return policy: The 5 questions you need to answer · 1. How long do I have? · 2. Where...
Read more >
Why use returned instance after save() on Spring Data JPA ...
I have a question here, I am saving an entity using save , which has few null columns. But those columns have default...
Read more >
Online Return Tips: How to Return Online Orders | FedEx
If you aren't sure what the store needs to process your return, call or message to ask. Make sure you ship the item...
Read more >
How To Write a Return Policy (+ Free Template) (2023) - Shopify
Refund the customer. Once the item is returned, merchants can refund the customer to their original payment method with the click of a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found