Nate,
Check out the view-entity and DynamicViewEntity stuff in the Entity Engine (the Entity Engine Guide has some details on these). These support sets of fields with group by and functions for aggregated data.
-David On Feb 15, 2007, at 8:21 AM, natx wrote:
Hey everybody. I hope this is an appropriate question for this particularbranch of the forum.Basically, I have a few Ofbiz entities set up which point to tables in a MySQL database. These tables all have a numeric field called "id" which acts as the primary key (established using the <prim-key field="id"/ construct). I'd like to have these id fields populated with a numeric sequence generatorwhich insures uniqueness.I'm pretty new to Ofbiz, so the first thing I did was look for a way to do this manually by using the equivalent to the MAX function in SQL to find the next number in the sequence. However, I wasn't able to find any use of theMAX function, unless I wanted to create a View Entity (which seemsunnecessary). So my first question is: is there any equivalent to the MAXfunction when using the GenericDelegator to run database queries? Note: I just discovered the existence of the getNextSeqId() method inGenericDelegator. Since there is an entity called "SequenceValueItem" in our entity model, I'm assuming that this will serve my purpose. But my firstquestion still stands. Thanks!-- Nate -- View this message in context: http://www.nabble.com/using- GenericDelegator%3A-what-is-the-MAX%28%29-functional-equivalent-- tf3234318.html#a8987232Sent from the OFBiz - User mailing list archive at Nabble.com.
smime.p7s
Description: S/MIME cryptographic signature
