Questions and discussion about developing processes and programming in PHP, JavaScript, web services & REST API.
Forum rules: Please search to see if a question has already asked before creating a new topic. Please don't post the same question in multiple forums.
User avatar
By ashkufaraz
#795614
Hi
I want change getAll function in class.applications.php.
I want join app_cahec_view with my pm table like this
Code: Select all
$Criteria->addAlias( 'IC', 'PMT_MYTABLE' );
$Criteria->addJoin( AppCacheViewPeer::APP_UID, 'IC.APP_UID', Criteria::LEFT_JOIN );
when i add where condtion say error
Code: Select all
$Criteria->add("IC.ID",  11 , Criteria::EQUAL);
But this code say error
Code: Select all
 wrapped: Cannot fetch TableMap for undefined table: PMT_MYTABLE
I think, i must update proper model and add my pmt table...

pleas help me
Last edited by ashkufaraz on Mon Sep 18, 2017 5:21 pm, edited 2 times in total.
User avatar
By programerboy
#795627
Hi,

I tested it and it worked properly and I didn't change model.

my code is:
Code: Select all
$Criteria->addAlias( 'TEST', 'PMT_TEST' );
$Criteria->addJoin( AppCacheViewPeer::USR_UID, 'TEST.NAME', Criteria::LEFT_JOIN );
Please check your database that table exist or not and check your table name for case sensitive characters.

Thanks
User avatar
By amosbatto
#795641
You need to edit the database schema located at workflow/engine/config/schema.xml and add your table there.

Then you need to use these commands to update the database schema in ProcessMaker:
cd /opt/processmaker [change to where ProcessMaker is installed]
php processmaker database-upgrade
See: http://wiki.processmaker.com/processmak ... se-upgrade

The problem is that your new schema might interfere with your existing Report Table. I haven't tried it. See if it still exports cases correctly to the Report Table when you run cases.
User avatar
By ashkufaraz
#795648
thanks amosbatto

I run database-upgrade command but say nothing to change in data base

I think this command does not check pmt table


Image
Last edited by ashkufaraz on Tue Sep 19, 2017 12:45 am, edited 1 time in total.
User avatar
By amosbatto
#795650
You are right. You have to also add all the model information in the code. Sorry, I don't know how to do that, but it probably isn't necessary. Read the code for Report Tables and you can figure out how to access them.
User avatar
By ashkufaraz
#795670
I do it...

add model file to
\htdocs\workflow\engine\classes\model

with this code
Code: Select all
$Criteria->addJoin( AppCacheViewPeer::APP_UID, MyTablePeer::APP_UID, Criteria::LEFT_JOIN );
$Criteria->add(MyTablePeer::ID, 1, Criteria::EQUAL);
What's SAP FICO?

Trustworthy and skill-building, each of these actu[…]

To convert MBOX to PST, start by downloading and i[…]

My Assignment Services stands out as one of the be[…]

Erectile Dysfunction, commonly known as impotence,[…]