My guess would be to just call add_to_providers and pass it the provider as a provider_id:
my $user = AppSys::User->create({ ... }); # Get the AppSys::Provider object my $provider = AppSys::Provider->retrieve(...); $user->add_to_providers({ provider_id => $provider, });
It looks like the provider has to exist in the ap_prprofile table for the AppSys::User->add_to_providers call to work. In other words, Class::DBI is not creating a new provider for you, it is just linking an existing provider to the user you just created.
I haven't used the mapping features of Class::DBI myself, but this is what I understand from the doc example.
- Cees
In reply to Re: Class::DBI - addiing map entry when adding to one of the mapped classes.
by cees
in thread Class::DBI - addiing map entry when adding to one of the mapped classes.
by jdtoronto
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |