Skip to content
Advertisement

How should I persist a PanacheEntity with data coming from a Websocket message?

I’m trying to persist the following entity when receiving a message from the client via Websocket:

JavaScript

The following persist works, when receiving a POST request:

JavaScript

However, the following code freezes when it reaches the persist line. The message.getPenguin() method is returning an actual Penguin reference (the MessageDecoder.class is doing it’s part):

JavaScript

I’m new to Panache/Hibernate, any help would be apreciated, thank you.

Advertisement

Answer

It worked like this:

JavaScript
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement