Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I set a default field value of an EntityProxy?

Say I have this:

TimeEntryProxy timeEntry = someRequestContext.create(TimeEntryProxy.class);

The created proxy is empty. Is there a way to set some of it's fields with a default value? For example, this proxy has a timeAllocation which is a double. Can it be set to 0 without having to do this:

timeEntry.setTimeAllocation(0);

Thank you

like image 203
code-gijoe Avatar asked Nov 13 '22 19:11

code-gijoe


1 Answers

How about setting default values in your custom Locator.create(Class c) method?

like image 137
milan Avatar answered Feb 24 '23 00:02

milan