This could be contribute through a patch into a Jira issue
https://cwiki.apache.org/confluence/display/OFBADMIN/OFBiz+Contributors+Best+Practices

Jacques

Foo Shyn Chung wrote:
Hi Daniel,

I'm not sure how the contribution process should go, but if it is ok with
you, would you mind to send me the patches for the field-to-select feature
as mention for the alias? I'm not sure whether this would breach any OFBiz
or your code's license or not...

I'm actually trying various ways to get this done but to no avail....if it
is not convenient for you to share your code, maybe you can give me a hint
on where should i look into to make this feature available on my code set?

Many Thanx
FooShyn

On Mon, Apr 16, 2012 at 6:16 PM, Daniel McAllister <raszt...@gmail.com>wrote:

Hello.
Im working on a forked version of Ofbiz. We have implemented the feature
that you actually need. I'm not aware that the current TRUNK implementation
contains this particular feature.

We have included the the option *field-to-select* to the alias.

A sample code: <alias name="finAccountTransTypeId" entity-alias="FAT"
field-to-select="false"/>

I can contribute this patch if you want to the public.

We have some more useful changes:

  - *Add join hint*: select * from b hash join c on b.b = c.b; select *
  from a merge join b on a.a = b.a
  - *Add query hin*t: select * from a with no (nolock); select * from a
  join b on a.a = b.a with with (nolock);  select * from a with (nolock)
join
  b on a.a = b.a with with (nolock)
  - *Add constant values to view-links (I think this is implemented for
  now): *

<view-link rel-entity-alias="ISE" entity-alias="FISIE" rel-optional="true">
<key-map field-name="importSessionId" rel-field-name="sessionId"/>
 <field-bound rel-field-name="status" rel-field-value="ERROR"/>
</view-link>
This produces something like this:
 select * from a left join b on a.importSessionId = b.sessionId and
status='ERROR'

On Mon, Apr 16, 2012 at 9:35 AM, Foo Shyn Chung <ipoh...@gmail.com> wrote:

I'd further tried by stating the field i wanted to select in a
fieldToSelect list and pass in the list to the
method findListIteratorByCondition that i'm using to select the data, while
stating the filters in the whereByCondition list. However an error
"FieldName approvedDate not found for entity: DynamicViewEntity is shown
instead.

Any workaround on this?

Thanx
FooShyn

On Mon, Apr 16, 2012 at 12:36 PM, Foo Shyn Chung <ipoh...@gmail.com>
wrote:

Hi,

I can't find such property, possible to point to me which attributes that
would likely to be able to configure this?

Thanx
FooShyn


On Mon, Apr 16, 2012 at 3:00 AM, <raszt...@gmail.com> wrote:

Hello. As far i know in an entityengine.xml there is an option for
<alias> that is used to state "dont include in the query". I think the
Dynamic query you can do the same.

Foo Shyn Chung <ipoh...@gmail.com> a következőt írta:

Hi all,

I have a situation whereby there's a filter i need to add into the
view-entity created via DynamicViewEntity, however this field is not being
declared with an Alias field.

The reason for this is because my SQL is actually a group by statement with
sum in the fields to get a total sales figure. The filter i would need to
add in is a date field filter so that it will only selects a range of sales
date to aggregate the data. However this date will not be a part of the
group by clause and hence cannot be selected.

Is there anyway that i can add in a condition without stating the field as
an Alias?

Thanx
FooShyn

Reply via email to