Error in listbyquery whit condition

hi
i have table solicitacao
and solicitacao have fk cliente_id from table cliente

where i try:
SolicitacaoFactory::listSolicitacaoByQuery(“cliente_id=1”, null);
i have one error:

Fatal error: Uncaught exception ‘epExceptionQueryPath’ with message ‘no field map for ‘cliente_id’’ in D:\workPHP\confianza\lib\phporm\src\query\epQueryPath.php:520 Stack trace: #0 D:\workPHP\confianza\lib\phporm\src\query\epQueryPath.php(433): epQueryPathNode->_obtainNodeByPath(Array, true) #1 D:\workPHP\confianza\lib\phporm\src\query\epQueryPath.php(1336): epQueryPathNode->insertPath(Array) #2 D:\workPHP\confianza\lib\phporm\src\query\epQueryBuilder.php(598): epQueryPathManager->insertPath(‘alias_1.cliente…’) #3 D:\workPHP\confianza\lib\phporm\src\query\epQueryBuilder.php(453): epQueryBuilder->processVariable(Object(epQueryNode)) #4 D:\workPHP\confianza\lib\phporm\src\query\epQueryBuilder.php(447): epQueryBuilder->walk(Array, Array) #5 D:\workPHP\confianza\lib\phporm\src\query\epQueryBuilder.php(447): epQueryBuilder->walk(Object(epQueryNode), ‘processVariable’, true) #6 D:\workPHP\confianza\lib\phporm\src\query\epQueryBuilder.php(447): epQueryBuilder->walk(Object(epQueryNode), ‘processVariable’, true) #7 D:\workPHP\co in D:\workPHP\confianza\lib\phporm\src\query\epQueryPath.php on line 520

tanks

Hello Hussan,

Can you send me your project file to have a look?

Best regards,
Rain

after create the database, create a client , create transporte, create produto, create cidade and try SAVE solicitacao

after try SolicitacaoFactory::listSolicitacaoByQuery(“cliente_id=1”, null);

tanks
alianza.vpp

Hello Hussan,

According to your model and code fragment, you are trying to query all solicitacao objects which is associated to cliente object with ID = 1. What you try is defining the query in HQL, but unfortunately HQL is only support for querying on columns which mapped to attributes (where FK are mapped to relationships).

In order to list out your required solicitacao objects, currently you have to list all from DB then check the cliente object one by one. We are resolving this problem and will keep you informed on any news about this issue.

If you require any further information, please do not hesitate to contact me again.

Best regards,
Rain

Hello Hussan,

I would like to let you know this problem has been fixed and you can find the latest build at the following link. If you need any help, please do not hesitate to contact me again.

http://files4.visual-paradigm.com/200807/Patch/20080707w/VP_Suite_Windows_3_3_20080707w.exe

Best regards,
Rain

tanks…

but this patch allow delete recursively?

on this topic
http://forums.visual-paradigm.com/posts/list/5916.html#82334

tanks
confianza.vpp

The deletion behavior is depends on how your define the association in class model. If you defining the association as composition, then it will recursively delete it’s child based on cascade action. Otherwise you will need to handle the deletion of child manually.

Best regards,
Rain