| Author |
Message |
|
2007/11/14 10:32
|
|
|
rbegga
Joined: 2007/11/14
Messages: 8
Offline
|
|
|
|
I noticed that if I create an entity with a composite key, the loadByORMID method that is automatically generated contains a bug:
public static function loadUserByORMID($name, $company) {
$m = epManager :: instance();
$user = $m->create('User');
$user->name = $name;
$users = $m->find($user);
$userValues = array_values($users);
return $userValues[0];
$user->company = $company;
$users = $m->find($user);
$userValues = array_values($users);
return $userValues[0];
} |
As you can see the function signature correctly contains both pieces of the composite key. However, the code generator in DBVA is trying to perform two separate searches, one for each half of the key when in fact it should be searching for both halves at the same time as in the following example which I coded by hand:
public static function loadUserByORMID($name, $company) {
$m = epManager :: instance();
$user = $m->create('User');
$user->name = $name;
$user->company = $company;
$users = $m->find($user);
$userValues = array_values($users);
return $userValues[0];
} |
Any idea how long this might take to fix?
|
|
|
|
 |
| |
|
2007/11/14 18:25
|
|
|
Jick
Joined: 2005/04/29
Messages: 2880
Offline
|
|
|
|
Hello rbegga,
I'll talk to our engineers and answer your qusetion asap.
Best regards,
Jick
|
Visual Paradigm International Ltd.
http://www.visual-paradigm.com
Build Quality Applications Faster, Better and Cheaper |
|
|
|
 |
| |
|
2007/11/15 07:19
|
|
|
rbegga
Joined: 2007/11/14
Messages: 8
Offline
|
|
|
|
Jick,
Thanks for looking into this I really appreciate it. Also, I am not sure if you saw my other post regarding transactions in PHP but I'm hoping maybe engineering has an idea there as well? I really need to be able to use transactions in my applicaitons.
-TJ
|
|
|
|
 |
| |
|
2007/11/15 19:06
|
|
|
Jick
Joined: 2005/04/29
Messages: 2880
Offline
|
|
|
|
Hi rbegga,
This is a bug. We will fix it and send you a patch tomorrow.
Best regards,
Jick
|
Visual Paradigm International Ltd.
http://www.visual-paradigm.com
Build Quality Applications Faster, Better and Cheaper |
|
|
|
 |
| |
|
2007/11/19 18:13
|
|
|
Jick
Joined: 2005/04/29
Messages: 2880
Offline
|
|
|
|
|
 |
| |
|
2007/11/20 05:35
|
|
|
rbegga
Joined: 2007/11/14
Messages: 8
Offline
|
|
|
|
Jick,
I need the patch to be for the MacOS X version of DBVA to test it out. Sorry I forgot to mention that again.
Thanks!
-TJ
|
|
|
|
 |
| |
|
2007/11/21 14:56
|
|
|
Rain
Joined: 2005/04/29
Messages: 735
Offline
|
|
|
|
|
 |
| |
|
2007/11/27 11:11
|
|
|
rbegga
Joined: 2007/11/14
Messages: 8
Offline
|
|
|
|
That fix seems to have worked. Thanks!
-TJ
|
|
|
|
 |
| |