Problem with booleans

11 views
Skip to first unread message

stackp...@gmail.com

unread,
Aug 4, 2025, 12:25:41 PMAug 4
to Ebean ORM
Hi, good afternoon,

I have a problem with boolean type. When I get the information from the request, sometimes the value for the boolean types are not in the request and get the default value.

Form<Car> carForm = formFactory.form(Car.class).bindFromRequest(request);
Car car = carForm.get();

And in the Entity Car I have:
public boolean isAutomatic false;

When isAutomatic is not in the request and car.update() , the value is not updated.
I have temporarily solved it with car.setIsAutomatic(car.getIsAutomatic()); but it is not the solution.

Any idea? Thanks

Rob Bygrave

unread,
Aug 4, 2025, 3:58:57 PMAug 4
to eb...@googlegroups.com
We don't know what formFactory is?  We don't know what bindFromRequest() is?  So we don't really understand any of the code you are showing here.

It looks like you are using a public field rather than a private field with accessors?

So are you able to show us using ebean code what you are doing and what the entity model looks like?


--

---
You received this message because you are subscribed to the Google Groups "Ebean ORM" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ebean+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/ebean/47513b05-71c5-4426-9749-a5cb5f528b52n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages