0

how can I declare an Insert Into in HQL Hibernate?, is it the same way as sql?

This is my code, that I need to migrate to hibernate:

DECLARE @variable int
SET @variable = (SELECT variable from entity WHERE description LIKE ('%Small%')) 
2
  • You can not do it. See the documentation for the list of available facilities.
    – SternK
    Commented Sep 3, 2020 at 13:40
  • I could not found it @SternK, can you plese give a hand for see the documentation?
    – Gonzalo
    Commented Sep 3, 2020 at 14:18

1 Answer 1

0

I solutioned the problem. I Just declare in the CONTROLLER an object and the save it. example:

//create an new object of the Entity and save using JPA
Example example = new Example() ;
example.setFuncion();
ExampleRepository.save(example);
//done

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.