how do i query the jade database?

For questions and postings not covered by the other forums
ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

how do i query the jade database?

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:32 pm

by Anonymous >> Wed, 11 Feb 2004 4:17:31 GMT

hi
thanks for your help on my previous two questions. Its much appreciated. My latest problem has to do with queries. All i want is to have a table that displays invoices, and checkboxes that the user can check to filter the contents of the table. (such as, all sales orders, unpaid, overdue, or unpaid and overdue). Right now i'm using a dynamic dictionary that sorts them by the attributes date and paid (but i need overdue too). I basically start the iterator at the date the user has entered and loop while the salesorder is paid or unpaid (depending on the check) ... but i don't know how to join the collection of paid or unpaid with the collection overdue or not overdue. I read the documentation on the report writer. Can the query engine be used away from the report writer? Also, the example of the Ad hoc query controller in the dyna dictionary documentation. I couldn't get those examples to work for me. I'm not sure what the best approach is .... any suggestions would be much appreciated. Thanks for help

les

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: how do i query the jade database?

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:32 pm

by allistar >> Wed, 11 Feb 2004 8:00:07 GMT

One suggestion is two have multiple collections of orders on your root object, like this:

allOrders (every single order)
allUnpaidOrders (every order that is unpaid)
allOverdueOrders (every order that is overdue)
allUnpaidOverdueOrders (every order that is unpaid and overdue)

I would key each of these by the due date of the order. Setup inverses on the Order class that relates to these collections: myRoot, myUnpaidRoot, muOverdueRoot, myUnpaidOverdueRoot and use the new JADE 6 feature of inverse conditions to manage the easy population of those collections.

I don't think that the query engine can be used outside of the report writer at the moment, although there is a rumour that it will be made into a separate tool in the future.

Regards,
Allistar.
--
------------------------------------------------------------------
Allistar Melville
Software Developer, Analyst allistar@silvermoon.co.nz
Auckland, NEW ZEALAND

Silvermoon Software
Specialising in JADE development and consulting
Visit us at: http://www.silvermoon.co.nz
*NEW* Simple web access to Jade at: www.silvermoon.co.nz/jhp.html ------------------------------------------------------------------

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: how do i query the jade database?

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:32 pm

by fargs >> Wed, 11 Feb 2004 13:46:06 GMT

thanks ... that helps alot.

les

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: how do i query the jade database?

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:33 pm

by Dr J. >> Wed, 11 Feb 2004 21:11:01 GMT

If you're going to use a constraint on your "not everything" inverses, then wouldn't it simplify your object model, and your transaction agents, to simply have a single Order::myRoot with multiple inverses of:

Root::allOrders
Root::allUnpaidOrders (constraint Order::isUnpaid) Root::allOverdueOrders (constraint Order::isOverdue) Root::allUnpaidOverdueOrders (constraint Order::isUnpaidAndOverdue)

and let the constraints handle which collection(s) a given instance of Order would be added to?

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: how do i query the jade database?

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:33 pm

by allistar >> Wed, 11 Feb 2004 22:49:28 GMT

I really like these new JADE 6 features. Thanks for the tip. We haven't moved our product to JADE 6 yet (we will be releasing the upgrade in a couple of weeks - the qualification process takes months).

Thanks,
Allistar.
--
------------------------------------------------------------------
Allistar Melville
Software Developer, Analyst allistar@silvermoon.co.nz
Auckland, NEW ZEALAND

Silvermoon Software
Specialising in JADE development and consulting
Visit us at: http://www.silvermoon.co.nz
*NEW* Simple web access to Jade at: www.silvermoon.co.nz/jhp.html ------------------------------------------------------------------


Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 47 guests