Relations and Modules

Hi,
I have built a reporting module for my solution and am having problems with relations. Can I do the following.

Main Solution
invoices_to_invoice_line_items (invoiceid = invoiceid)

Module has
mod_invoices_to_invoice_line_items (invoiceid = invoiceid)

I can see both relations fine in the Main solution, but some aggregations refuse to work.

This agg works fine without the module installed
invoices_to_invoice_line_items.invoice_totals

After installation of module the only way to have it return the correct figure is to restart servoy.

I don’t really understand this remark:

After installation of module the only way to have it return the correct figure is to restart servoy.

And, what happens when you define the aggregations in both your solution and module?

BTW I think it should work either way…

Hi Marcel,
Thanks for your reply, I have done a little more research and it seems that if I remove the module from the parent solution, the aggregate then works as expected. which would indicate a problem with the module. but as there are no errors messages I’m am not sure what to look for.

So the problem is as follows:

I have a parent form displaying related line items through the relation
invoices_to_invoice_line_items in a portal, then a line total calculation in the line items table, then finally a aggregate of the line total. I then display the line item aggregate in the parent form as a invoice total. All of this works fine until I load the module then the aggregate no longer updates or reflects changes in the lineitems table.

I’m sorry for the essay, but this has got me stumped, I have used this all over my solution with no problems. All methods forms etc relations in the module have prefixed with mod_ so not to conflict. And there are no errors on start up.

I really need some help with this one, it does not make any sense, can I do the following??

  1. have a aggregate on the same calculation in both the main solution and the module solution with different names

modLineTotal sum sub_total this aggregate is in the module
invoice _totals sum sub_total this aggregate is in the mail solution

if the solutions are separated I have no problems, once module is attached to main solution the aggregate fails to work.

I was under the impression that if I use different names I would have no problems???

Hi Phil,

What version of Servoy are you using. And do you see this issue in Developer or one of the clients (or all).
Also do you see any errors in the server log (even when running developer).

And to narrow the problem down a little more check to see if the aggregate query is actually send to the back-end by looking for the query in the Performance Data page in the servoy-admin pages.

Hi Robert,
Thanks for your reply.
I am using 3.5.6, the problem occurs in both client and developer, there are no errors in the server log but there is NO aggregate logged in performance log. Hmm why would that be ???
Phil

Hi Phil,

It very much sounds like a bug.
I tried to reproduce the issue but it all works fine for me.
Do you see the same behavior with older 3.5 versions?

I suggest you make a simple solution with a module to reproduce the issue and file that in the bugbase.

Hope this helps.