[OFBiz] Dev - What is up with "Stamp" fields?
Al Byers
byersa at automationgroups.com
Sat Sep 11 02:29:50 EDT 2004
In talking to David, it turns out that this is a fact of life. The
"stamp" fields are not included in an "auto-attribute" population, but
they are included when a population action (like setAllFields) is done
on a GenericValue that has the stamp fields. The answer to my situation
was to use the ModelService.makeValid method as in:
ModelService modelService =
dctx.getModelService("persistContentAndAssoc");
Map serviceIn = modelService.makeValid(contentClone, "IN");
serviceIn.put("userLogin", userLogin);
...
-Al
Al Byers wrote:
> I know that the transactional stamp fields, createdStamp,
> createdTxStamp, lastUpdatedStamp, lastUpdatedTxStamp, have been there
> for awhile, but I just ran into a problem and I don't know if it is
> because that situation has never come up or something has changed.
>
> I have a service that uses "auto-attributes" on the Content entity to
> define allowed inputs and the "stamp" fields are not part of the
> entitymodel.xml definition. At one place in my code I populate a
> service input map with map.putAll(content_value) where content_value
> is retrieved from the database and has the stamp fields as part of its
> fields. The service then fails because the stamp fields are not part
> of the definition.
>
> Does the auto-attributes need to change?
>
> -Al
>
--
Al Byers
Automation Groups Inc
801.400.5111
http://www.automationgroups.com
byersa at automationgroups.com
We're "Open for Business" (http://www.ofbiz.org)
- the leader in Java-based Web services development tools
More information about the Dev
mailing list