Page 4 of 4

PostPosted: Wed Aug 22, 2007 6:17 pm
by pbakker
The tablefilter is indeed the way to go in SaaS solutions where the chosen SaaS implementation is one where the data of all customers is stored in the same database and tables, separated only by an "ownerid" column.

The tablefilter adds the additional where-clause to all SQL statements generated by Servoy. So, if you use your own SQl statements in your solution to get data, you need to take care of adding the additional where-clause yourself.

Same goes for Jasper Reports: You put the queries into the report, not Servoy (and the reports execute Server side, so not aware of what has been set in the Client).

Paul

PostPosted: Wed Aug 22, 2007 6:33 pm
by Michael Mooney
Thanks, Paul - makes sense and seems logical for SaaS as described. This function will look after the bulk of the work. Appreciated ...

Michael.

delete under saas shared database

PostPosted: Thu Sep 13, 2007 12:11 pm
by netweaver
Hi Paul
I have created modified a copy of the servoy crm application into a production ready saas application.

I added a "customerid" field to the udm tables, which i then use in the tablefilter. This field is filled with a unique customer code(eg 1000, 1001, etc) that is associated with the logged on user.

The problem i am experiencing is that when i click the delete button on the orders form, frm_order, the delete does not happen. In the debugger, the methos, controller.delete() does not perform the action.
The delete does however work on the crm contacts page, where exactly the same code is performed.

I tested the delete action on the servoy crm app (the original) and this works fine, but on my modified version it does not work on the orders form only.

Youe help would be greatly appreciated.
Thanks
Marcus

pbakker wrote:The tablefilter is indeed the way to go in SaaS solutions where the chosen SaaS implementation is one where the data of all customers is stored in the same database and tables, separated only by an "ownerid" column.

The tablefilter adds the additional where-clause to all SQL statements generated by Servoy. So, if you use your own SQl statements in your solution to get data, you need to take care of adding the additional where-clause yourself.

Same goes for Jasper Reports: You put the queries into the report, not Servoy (and the reports execute Server side, so not aware of what has been set in the Client).

Paul

PostPosted: Thu Sep 13, 2007 12:28 pm
by pbakker
I think you must have modified some more, because having a tablefilter should not have any effect on the ability to delete records or not.

As you state yourself, on another table it still works...

PostPosted: Thu Sep 13, 2007 1:47 pm
by Harry Catharell
Hi Marcus,

This could be caused by relationships not allowing deletes.

Sounds as though you have added a relationship from logged in user to the Orders and the relationships properties may not be set to allow the delete to take place ?

Take a look at this thread which sounds like a similar issue:
http://forum.servoy.com/viewtopic.php?t=8891&highlight=

Cheers
Harry