Issue 10924

Change implementation of insertByAgentKey of the AgentComponentManager

10924
Reporter: jcuadra
Assignee: jcuadra
Type: Bug
Summary: Change implementation of insertByAgentKey of the AgentComponentManager
Priority: Major
Resolution: Fixed
Status: Closed
Created: 2012-03-08 18:11:16.978
Updated: 2013-12-16 17:51:01.297
Resolved: 2012-03-09 15:42:51.866
        
Description: Currently its using one single call to the mappers, but mybatis seems to have some issues with confronted with a INSERT INTO..SELECT. The id property is not populated back into the persisted object, so therefore all kinds of errors are happening in the upper layers. Need to change the implementation to make two different calls to the mapper.

Possible:
1. getIdForAgentKey(UUID)
2. populate the returned agentId into the component's agentId's property
3. persist the component object with a simple insert(Component) - this is guaranteed to populate back the generated id]]>