Le 07/09/2012 07:51, Jacques Le Roux a écrit :
HI Nicolas,

Since we did not get any feedback
harm
I suggest to
* add missing created fields on ValueLinkKey
* take into account lastUpdate fields in ShipmentRouteSegment as a field to handle in entity-auto as the same purpose (easier than migrating IMO) * add lastModified fields on QuoteAdjustment, OrderAdjustment, ReturnAdjustment and OrderPaymentPreference
Ok just adding code, no modification.

Why did you suggest to
* remove all fields created/lastModified from entities definition and use an attribute on entity tag as like '<entity name="QuoteAdjustment" auto-created-last-modified="true">
? This would be a major disruptment and I don't get the reason for it
A reasoning on a up level. First proposition is to correct and homogenize entities but last/created fields would be manage only by service, and the reason to work directly by entity-auto. The pattern has been always the same.
I see the advantage :
* simple analyse bu modelEntity.isAutoCreatedLastModified() instead of modelEntity.hasField("createdUserLogin") && ... * simple to extend <extend-entity entity-name="InvoiceItem" auto-created-last-modified="true"> instead of <extend-entity entity-name="InvoiceItem"><field name="createdUserLogin" >....
 * simple to improve

I don't see what disruptment would be generate by this idea, but your right at first one step :)

I will adding missing fields and analysis on jira

Nicolas


Thanks

Jacques

From: "Nicolas Malin" <malin.nico...@librenberry.net>
Hi,

With Jacques, we checked ofbiz data model to sure that all case would be manage by entity-auto for fields [created/lastModified]Date and [created/lastModified]ByUserLogin present on some entities.

We found :
* QuoteAdjustment, OrderAdjustment, ReturnAdjustment and OrderPaymentPreference with only created fields but isn't a problem.
  * ValueLinkKey have only lastModified fields (missing created)
* ShipmentRouteSegment don't use lastModifiedDate, lastModifiedByUserLogin but lastUpdateDate, updateByUserLogin.

We have many solution :
 * keep entities like that
 * add just missing created fields on ValueLinkKey
 * migrate lastUpdate fields to lastModified on ShipmentRouteSegment
* adding lastModified fields on QuoteAdjustment, OrderAdjustment, ReturnAdjustment and OrderPaymentPreference * remove all fields created/lastModified from entities definition and use an attribute on entity tag as like '<entity name="QuoteAdjustment" auto-created-last-modified="true">

Your opinions ?

Le 09/08/2012 08:48, Jacques Le Roux a écrit :
From: "Adrian Crum" <adrian.c...@sandglass-software.com>
On 8/8/2012 10:06 PM, Malin Nicolas wrote:
I suggest to extend entity-auto engine with these fields management since they always have the same initialisation.

That sounds like a good enhancement.

-Adrian

+1, well spotted Nicolas, we must be sure to not miss any fields like this. Could there be other cases with incrementation or such?
Other case will be found during the migration :) .


What was the pb when only error label? I think we can migrate them keeping the error messages, right? Or should we get rid of them and have something generalised? Or should we add error message to such migrated services? Just thinking aloud here, not really awake
yet ;o)
:) I check if is possible to manage error message en entity-auto. Pending, I will open a jira isssue to load my patch on the last proposal.



Jacques



--
Nicolas MALIN
Consultant
Tél : 06.17.66.40.06
Site projet : http://www.neogia.org/
-------
Société LibrenBerry
Tél : 02.48.02.56.12
Site : http://www.librenberry.net/



--
Nicolas MALIN
Consultant
Tél : 06.17.66.40.06
Site projet : http://www.neogia.org/
-------
Société LibrenBerry
Tél : 02.48.02.56.12
Site : http://www.librenberry.net/

Reply via email to