Search in sources :

Example 11 with RShadow

use of com.evolveum.midpoint.repo.sql.data.common.RShadow in project midpoint by Evolveum.

the class ExtensionTest method test430AddHiddenAttributeValues.

// skipping replace non-indexed attribute value test (x29)
@Test
public void test430AddHiddenAttributeValues() throws Exception {
    OperationResult result = new OperationResult(ExtensionTest.class.getName() + ".test430AddHiddenAttributeValues");
    ObjectDelta<ShadowType> delta = getPrismContext().deltaFor(ShadowType.class).item(ItemPath.create(ShadowType.F_ATTRIBUTES, ATTR_MEMBER), attrMemberDefinition).add("tbrown", "jsmith").asObjectDelta("");
    delta.applyTo(expectedShadow);
    queryListener.start();
    repositoryService.modifyObject(ShadowType.class, shadowOid, delta.getModifications(), getOptions(), result);
    queryListener.dumpAndStop();
    try (Session session = factory.openSession()) {
        RShadow s = session.get(RShadow.class, shadowOid);
        assertExtension(s, itemGroupName, "ALUMNI");
        assertExtension(s, itemMember, "banderson", "kwhite", "tbrown", "jsmith");
        assertExtension(s, itemManager, "chuck");
    }
    assertGetObject(result);
    /*
 [1] select oid from m_object where oid = ? for update
 [1] select rshadow0_.oid as oid1_27_, rshadow0_1_.createChannel as createCh2_27_, rshadow0_1_.createTimestamp as createTi3_27_, rshadow0_1_.creatorRef_relation as creatorR4_27_, rshadow0_1_.creatorRef_targetOid as creatorR5_27_, rshadow0_1_.creatorRef_type as creatorR6_27_, rshadow0_1_.fullObject as fullObje7_27_, rshadow0_1_.lifecycleState as lifecycl8_27_, rshadow0_1_.modifierRef_relation as modifier9_27_, rshadow0_1_.modifierRef_targetOid as modifie10_27_, rshadow0_1_.modifierRef_type as modifie11_27_, rshadow0_1_.modifyChannel as modifyC12_27_, rshadow0_1_.modifyTimestamp as modifyT13_27_, rshadow0_1_.name_norm as name_no14_27_, rshadow0_1_.name_orig as name_or15_27_, rshadow0_1_.objectTypeClass as objectT16_27_, rshadow0_1_.tenantRef_relation as tenantR17_27_, rshadow0_1_.tenantRef_targetOid as tenantR18_27_, rshadow0_1_.tenantRef_type as tenantR19_27_, rshadow0_1_.version as version20_27_, rshadow0_.attemptNumber as attemptN1_41_, rshadow0_.dead as dead2_41_, rshadow0_.exist as exist3_41_, rshadow0_.failedOperationType as failedOp4_41_, rshadow0_.fullSynchronizationTimestamp as fullSync5_41_, rshadow0_.intent as intent6_41_, rshadow0_.kind as kind7_41_, rshadow0_.name_norm as name_nor8_41_, rshadow0_.name_orig as name_ori9_41_, rshadow0_.objectClass as objectC10_41_, rshadow0_.pendingOperationCount as pending11_41_, rshadow0_.primaryIdentifierValue as primary12_41_, rshadow0_.resourceRef_relation as resourc13_41_, rshadow0_.resourceRef_targetOid as resourc14_41_, rshadow0_.resourceRef_type as resourc15_41_, rshadow0_.status as status16_41_, rshadow0_.synchronizationSituation as synchro17_41_, rshadow0_.synchronizationTimestamp as synchro18_41_ from m_shadow rshadow0_ inner join m_object rshadow0_1_ on rshadow0_.oid=rshadow0_1_.oid where rshadow0_.oid=?
 [2] insert into m_object_ext_string (item_id, owner_oid, ownerType, stringValue) values (?, ?, ?, ?)
 [1] update m_object set createChannel=?, createTimestamp=?, creatorRef_relation=?, creatorRef_targetOid=?, creatorRef_type=?, fullObject=?, lifecycleState=?, modifierRef_relation=?, modifierRef_targetOid=?, modifierRef_type=?, modifyChannel=?, modifyTimestamp=?, name_norm=?, name_orig=?, objectTypeClass=?, tenantRef_relation=?, tenantRef_targetOid=?, tenantRef_type=?, version=? where oid=?

        safe insertions:

 [1] select oid from m_object where oid = ? for update
 [1] select rshadow0_.oid as oid1_27_, rshadow0_1_.createChannel as createCh2_27_, rshadow0_1_.createTimestamp as createTi3_27_, rshadow0_1_.creatorRef_relation as creatorR4_27_, rshadow0_1_.creatorRef_targetOid as creatorR5_27_, rshadow0_1_.creatorRef_type as creatorR6_27_, rshadow0_1_.fullObject as fullObje7_27_, rshadow0_1_.lifecycleState as lifecycl8_27_, rshadow0_1_.modifierRef_relation as modifier9_27_, rshadow0_1_.modifierRef_targetOid as modifie10_27_, rshadow0_1_.modifierRef_type as modifie11_27_, rshadow0_1_.modifyChannel as modifyC12_27_, rshadow0_1_.modifyTimestamp as modifyT13_27_, rshadow0_1_.name_norm as name_no14_27_, rshadow0_1_.name_orig as name_or15_27_, rshadow0_1_.objectTypeClass as objectT16_27_, rshadow0_1_.tenantRef_relation as tenantR17_27_, rshadow0_1_.tenantRef_targetOid as tenantR18_27_, rshadow0_1_.tenantRef_type as tenantR19_27_, rshadow0_1_.version as version20_27_, rshadow0_.attemptNumber as attemptN1_41_, rshadow0_.dead as dead2_41_, rshadow0_.exist as exist3_41_, rshadow0_.failedOperationType as failedOp4_41_, rshadow0_.fullSynchronizationTimestamp as fullSync5_41_, rshadow0_.intent as intent6_41_, rshadow0_.kind as kind7_41_, rshadow0_.name_norm as name_nor8_41_, rshadow0_.name_orig as name_ori9_41_, rshadow0_.objectClass as objectC10_41_, rshadow0_.pendingOperationCount as pending11_41_, rshadow0_.primaryIdentifierValue as primary12_41_, rshadow0_.resourceRef_relation as resourc13_41_, rshadow0_.resourceRef_targetOid as resourc14_41_, rshadow0_.resourceRef_type as resourc15_41_, rshadow0_.status as status16_41_, rshadow0_.synchronizationSituation as synchro17_41_, rshadow0_.synchronizationTimestamp as synchro18_41_ from m_shadow rshadow0_ inner join m_object rshadow0_1_ on rshadow0_.oid=rshadow0_1_.oid where rshadow0_.oid=?
 [1] select roextstrin0_.item_id as item_id1_33_0_, roextstrin0_.owner_oid as owner_oi2_33_0_, roextstrin0_.ownerType as ownerTyp3_33_0_, roextstrin0_.stringValue as stringVa4_33_0_ from m_object_ext_string roextstrin0_ where roextstrin0_.item_id=? and roextstrin0_.owner_oid=? and roextstrin0_.ownerType=? and roextstrin0_.stringValue=?
 [1] select roextstrin0_.item_id as item_id1_33_0_, roextstrin0_.owner_oid as owner_oi2_33_0_, roextstrin0_.ownerType as ownerTyp3_33_0_, roextstrin0_.stringValue as stringVa4_33_0_ from m_object_ext_string roextstrin0_ where roextstrin0_.item_id=? and roextstrin0_.owner_oid=? and roextstrin0_.ownerType=? and roextstrin0_.stringValue=?
 [2] insert into m_object_ext_string (item_id, owner_oid, ownerType, stringValue) values (?, ?, ?, ?)
 [1] update m_object set createChannel=?, createTimestamp=?, creatorRef_relation=?, creatorRef_targetOid=?, creatorRef_type=?, fullObject=?, lifecycleState=?, modifierRef_relation=?, modifierRef_targetOid=?, modifierRef_type=?, modifyChannel=?, modifyTimestamp=?, name_norm=?, name_orig=?, objectTypeClass=?, tenantRef_relation=?, tenantRef_targetOid=?, tenantRef_type=?, version=? where oid=?
         */
    assertCounts(4 + getExtraSafeInsertionSelects(2), 5 + getExtraSafeInsertionSelects(2));
}
Also used : OperationResult(com.evolveum.midpoint.schema.result.OperationResult) RShadow(com.evolveum.midpoint.repo.sql.data.common.RShadow) Session(org.hibernate.Session) Test(org.testng.annotations.Test)

Example 12 with RShadow

use of com.evolveum.midpoint.repo.sql.data.common.RShadow in project midpoint by Evolveum.

the class ExtensionTest method test410AddShadow.

@Test
public void test410AddShadow() throws Exception {
    OperationResult result = new OperationResult(ExtensionTest.class.getName() + ".test410AddShadow");
    expectedShadow = shadowDefinition.instantiate();
    expectedShadow.asObjectable().name("alumni");
    PrismContainer<?> attributesContainer = shadowAttributesDefinition.instantiate();
    expectedShadow.getValue().add(attributesContainer);
    PrismContainerValue<?> attributes = attributesContainer.getValue();
    ResourceAttribute<String> name = attrGroupNameDefinition.instantiate();
    name.setRealValue("alumni");
    attributes.add(name);
    ResourceAttribute<String> member = attrMemberDefinition.instantiate();
    member.addRealValues("banderson", "kwhite");
    attributes.add(member);
    ResourceAttribute<String> manager = attrManagerDefinition.instantiate();
    manager.addRealValues("jack", "jim");
    attributes.add(manager);
    queryListener.start();
    shadowOid = repositoryService.addObject(expectedShadow.clone(), null, result);
    queryListener.dumpAndStop();
    try (Session session = factory.openSession()) {
        RShadow s = session.get(RShadow.class, shadowOid);
        assertExtension(s, itemGroupName, "alumni");
        assertExtension(s, itemMember, "banderson", "kwhite");
        assertExtension(s, itemManager, "jack", "jim");
    }
    assertGetShadow(result);
    /*
 [1] insert into m_object (createChannel, createTimestamp, creatorRef_relation, creatorRef_targetOid, creatorRef_type, fullObject, lifecycleState, modifierRef_relation, modifierRef_targetOid, modifierRef_type, modifyChannel, modifyTimestamp, name_norm, name_orig, objectTypeClass, tenantRef_relation, tenantRef_targetOid, tenantRef_type, version, oid) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
 [1] insert into m_shadow (attemptNumber, dead, exist, failedOperationType, fullSynchronizationTimestamp, intent, kind, name_norm, name_orig, objectClass, pendingOperationCount, primaryIdentifierValue, resourceRef_relation, resourceRef_targetOid, resourceRef_type, status, synchronizationSituation, synchronizationTimestamp, oid) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
 [5] insert into m_object_ext_string (item_id, owner_oid, ownerType, stringValue) values (?, ?, ?, ?)
         */
    assertCounts(3, 7);
}
Also used : OperationResult(com.evolveum.midpoint.schema.result.OperationResult) RShadow(com.evolveum.midpoint.repo.sql.data.common.RShadow) Session(org.hibernate.Session) Test(org.testng.annotations.Test)

Example 13 with RShadow

use of com.evolveum.midpoint.repo.sql.data.common.RShadow in project midpoint by Evolveum.

the class ExtensionTest method test425AddVisibleAttributeValuesDuplicate.

@Test
public void test425AddVisibleAttributeValuesDuplicate() throws Exception {
    OperationResult result = new OperationResult(ExtensionTest.class.getName() + ".test425AddVisibleAttributeValuesDuplicate");
    ObjectDelta<ShadowType> delta = getPrismContext().deltaFor(ShadowType.class).item(ItemPath.create(ShadowType.F_ATTRIBUTES, ATTR_MANAGER), attrManagerDefinition).add("alice", "bob").asObjectDelta("");
    delta.applyTo(expectedShadow);
    queryListener.start();
    repositoryService.modifyObject(ShadowType.class, shadowOid, delta.getModifications(), getOptions(), result);
    queryListener.dumpAndStop();
    try (Session session = factory.openSession()) {
        RShadow s = session.get(RShadow.class, shadowOid);
        assertExtension(s, itemGroupName, "alumni");
        assertExtension(s, itemMember, "banderson", "kwhite");
        assertExtension(s, itemManager, "jack", "jim", "alice", "bob");
    }
    assertGetShadow(result);
    /*
 [1] select oid from m_object where oid = ? for update
 [1] select rshadow0_.oid as oid1_27_, rshadow0_1_.createChannel as createCh2_27_, rshadow0_1_.createTimestamp as createTi3_27_, rshadow0_1_.creatorRef_relation as creatorR4_27_, rshadow0_1_.creatorRef_targetOid as creatorR5_27_, rshadow0_1_.creatorRef_type as creatorR6_27_, rshadow0_1_.fullObject as fullObje7_27_, rshadow0_1_.lifecycleState as lifecycl8_27_, rshadow0_1_.modifierRef_relation as modifier9_27_, rshadow0_1_.modifierRef_targetOid as modifie10_27_, rshadow0_1_.modifierRef_type as modifie11_27_, rshadow0_1_.modifyChannel as modifyC12_27_, rshadow0_1_.modifyTimestamp as modifyT13_27_, rshadow0_1_.name_norm as name_no14_27_, rshadow0_1_.name_orig as name_or15_27_, rshadow0_1_.objectTypeClass as objectT16_27_, rshadow0_1_.tenantRef_relation as tenantR17_27_, rshadow0_1_.tenantRef_targetOid as tenantR18_27_, rshadow0_1_.tenantRef_type as tenantR19_27_, rshadow0_1_.version as version20_27_, rshadow0_.attemptNumber as attemptN1_41_, rshadow0_.dead as dead2_41_, rshadow0_.exist as exist3_41_, rshadow0_.failedOperationType as failedOp4_41_, rshadow0_.fullSynchronizationTimestamp as fullSync5_41_, rshadow0_.intent as intent6_41_, rshadow0_.kind as kind7_41_, rshadow0_.name_norm as name_nor8_41_, rshadow0_.name_orig as name_ori9_41_, rshadow0_.objectClass as objectC10_41_, rshadow0_.pendingOperationCount as pending11_41_, rshadow0_.primaryIdentifierValue as primary12_41_, rshadow0_.resourceRef_relation as resourc13_41_, rshadow0_.resourceRef_targetOid as resourc14_41_, rshadow0_.resourceRef_type as resourc15_41_, rshadow0_.status as status16_41_, rshadow0_.synchronizationSituation as synchro17_41_, rshadow0_.synchronizationTimestamp as synchro18_41_ from m_shadow rshadow0_ inner join m_object rshadow0_1_ on rshadow0_.oid=rshadow0_1_.oid where rshadow0_.oid=?
 [1] update m_object set createChannel=?, createTimestamp=?, creatorRef_relation=?, creatorRef_targetOid=?, creatorRef_type=?, fullObject=?, lifecycleState=?, modifierRef_relation=?, modifierRef_targetOid=?, modifierRef_type=?, modifyChannel=?, modifyTimestamp=?, name_norm=?, name_orig=?, objectTypeClass=?, tenantRef_relation=?, tenantRef_targetOid=?, tenantRef_type=?, version=? where oid=?
         */
    assertCounts(3, 3);
}
Also used : OperationResult(com.evolveum.midpoint.schema.result.OperationResult) RShadow(com.evolveum.midpoint.repo.sql.data.common.RShadow) Session(org.hibernate.Session) Test(org.testng.annotations.Test)

Example 14 with RShadow

use of com.evolveum.midpoint.repo.sql.data.common.RShadow in project midpoint by Evolveum.

the class ExtensionTest method test436DeleteHiddenAttributeValuesDuplicate.

@Test
public void test436DeleteHiddenAttributeValuesDuplicate() throws Exception {
    OperationResult result = new OperationResult(ExtensionTest.class.getName() + ".test436DeleteHiddenAttributeValuesDuplicate");
    ObjectDelta<ShadowType> delta = getPrismContext().deltaFor(ShadowType.class).item(ItemPath.create(ShadowType.F_ATTRIBUTES, ATTR_MEMBER), attrMemberDefinition).delete("tbrown", "jsmith").asObjectDelta("");
    delta.applyTo(expectedShadow);
    queryListener.start();
    repositoryService.modifyObject(ShadowType.class, shadowOid, delta.getModifications(), getOptions(), result);
    queryListener.dumpAndStop();
    try (Session session = factory.openSession()) {
        RShadow s = session.get(RShadow.class, shadowOid);
        assertExtension(s, itemGroupName, "ALUMNI");
        assertExtension(s, itemMember, "banderson", "kwhite");
        assertExtension(s, itemManager, "chuck");
    }
    assertGetObject(result);
    /*
 [1] select oid from m_object where oid = ? for update
 [1] select rshadow0_.oid as oid1_27_, rshadow0_1_.createChannel as createCh2_27_, rshadow0_1_.createTimestamp as createTi3_27_, rshadow0_1_.creatorRef_relation as creatorR4_27_, rshadow0_1_.creatorRef_targetOid as creatorR5_27_, rshadow0_1_.creatorRef_type as creatorR6_27_, rshadow0_1_.fullObject as fullObje7_27_, rshadow0_1_.lifecycleState as lifecycl8_27_, rshadow0_1_.modifierRef_relation as modifier9_27_, rshadow0_1_.modifierRef_targetOid as modifie10_27_, rshadow0_1_.modifierRef_type as modifie11_27_, rshadow0_1_.modifyChannel as modifyC12_27_, rshadow0_1_.modifyTimestamp as modifyT13_27_, rshadow0_1_.name_norm as name_no14_27_, rshadow0_1_.name_orig as name_or15_27_, rshadow0_1_.objectTypeClass as objectT16_27_, rshadow0_1_.tenantRef_relation as tenantR17_27_, rshadow0_1_.tenantRef_targetOid as tenantR18_27_, rshadow0_1_.tenantRef_type as tenantR19_27_, rshadow0_1_.version as version20_27_, rshadow0_.attemptNumber as attemptN1_41_, rshadow0_.dead as dead2_41_, rshadow0_.exist as exist3_41_, rshadow0_.failedOperationType as failedOp4_41_, rshadow0_.fullSynchronizationTimestamp as fullSync5_41_, rshadow0_.intent as intent6_41_, rshadow0_.kind as kind7_41_, rshadow0_.name_norm as name_nor8_41_, rshadow0_.name_orig as name_ori9_41_, rshadow0_.objectClass as objectC10_41_, rshadow0_.pendingOperationCount as pending11_41_, rshadow0_.primaryIdentifierValue as primary12_41_, rshadow0_.resourceRef_relation as resourc13_41_, rshadow0_.resourceRef_targetOid as resourc14_41_, rshadow0_.resourceRef_type as resourc15_41_, rshadow0_.status as status16_41_, rshadow0_.synchronizationSituation as synchro17_41_, rshadow0_.synchronizationTimestamp as synchro18_41_ from m_shadow rshadow0_ inner join m_object rshadow0_1_ on rshadow0_.oid=rshadow0_1_.oid where rshadow0_.oid=?
 [1] select strings0_.owner_oid as owner_oi2_33_0_, strings0_.item_id as item_id1_33_0_, strings0_.ownerType as ownerTyp3_33_0_, strings0_.stringValue as stringVa4_33_0_, strings0_.item_id as item_id1_33_1_, strings0_.owner_oid as owner_oi2_33_1_, strings0_.ownerType as ownerTyp3_33_1_, strings0_.stringValue as stringVa4_33_1_ from m_object_ext_string strings0_ where strings0_.owner_oid=?
 [1] update m_object set createChannel=?, createTimestamp=?, creatorRef_relation=?, creatorRef_targetOid=?, creatorRef_type=?, fullObject=?, lifecycleState=?, modifierRef_relation=?, modifierRef_targetOid=?, modifierRef_type=?, modifyChannel=?, modifyTimestamp=?, name_norm=?, name_orig=?, objectTypeClass=?, tenantRef_relation=?, tenantRef_targetOid=?, tenantRef_type=?, version=? where oid=?

        no fetch delete

 [1] select oid from m_object where oid = ? for update
 [1] select rshadow0_.oid as oid1_27_, rshadow0_1_.createChannel as createCh2_27_, rshadow0_1_.createTimestamp as createTi3_27_, rshadow0_1_.creatorRef_relation as creatorR4_27_, rshadow0_1_.creatorRef_targetOid as creatorR5_27_, rshadow0_1_.creatorRef_type as creatorR6_27_, rshadow0_1_.fullObject as fullObje7_27_, rshadow0_1_.lifecycleState as lifecycl8_27_, rshadow0_1_.modifierRef_relation as modifier9_27_, rshadow0_1_.modifierRef_targetOid as modifie10_27_, rshadow0_1_.modifierRef_type as modifie11_27_, rshadow0_1_.modifyChannel as modifyC12_27_, rshadow0_1_.modifyTimestamp as modifyT13_27_, rshadow0_1_.name_norm as name_no14_27_, rshadow0_1_.name_orig as name_or15_27_, rshadow0_1_.objectTypeClass as objectT16_27_, rshadow0_1_.tenantRef_relation as tenantR17_27_, rshadow0_1_.tenantRef_targetOid as tenantR18_27_, rshadow0_1_.tenantRef_type as tenantR19_27_, rshadow0_1_.version as version20_27_, rshadow0_.attemptNumber as attemptN1_41_, rshadow0_.dead as dead2_41_, rshadow0_.exist as exist3_41_, rshadow0_.failedOperationType as failedOp4_41_, rshadow0_.fullSynchronizationTimestamp as fullSync5_41_, rshadow0_.intent as intent6_41_, rshadow0_.kind as kind7_41_, rshadow0_.name_norm as name_nor8_41_, rshadow0_.name_orig as name_ori9_41_, rshadow0_.objectClass as objectC10_41_, rshadow0_.pendingOperationCount as pending11_41_, rshadow0_.primaryIdentifierValue as primary12_41_, rshadow0_.resourceRef_relation as resourc13_41_, rshadow0_.resourceRef_targetOid as resourc14_41_, rshadow0_.resourceRef_type as resourc15_41_, rshadow0_.status as status16_41_, rshadow0_.synchronizationSituation as synchro17_41_, rshadow0_.synchronizationTimestamp as synchro18_41_ from m_shadow rshadow0_ inner join m_object rshadow0_1_ on rshadow0_.oid=rshadow0_1_.oid where rshadow0_.oid=?
 [1] delete from m_object_ext_string where owner_oid=? and ownerType=? and item_id=? and stringValue=?
 [1] delete from m_object_ext_string where owner_oid=? and ownerType=? and item_id=? and stringValue=?
 [1] update m_object set createChannel=?, createTimestamp=?, creatorRef_relation=?, creatorRef_targetOid=?, creatorRef_type=?, fullObject=?, lifecycleState=?, modifierRef_relation=?, modifierRef_targetOid=?, modifierRef_type=?, modifyChannel=?, modifyTimestamp=?, name_norm=?, name_orig=?, objectTypeClass=?, tenantRef_relation=?, tenantRef_targetOid=?, tenantRef_type=?, version=? where oid=?
         */
    if (isNoFetchDeletion()) {
        assertCounts(5, 5);
    } else {
        assertCounts(4, 4);
    }
}
Also used : OperationResult(com.evolveum.midpoint.schema.result.OperationResult) RShadow(com.evolveum.midpoint.repo.sql.data.common.RShadow) Session(org.hibernate.Session) Test(org.testng.annotations.Test)

Example 15 with RShadow

use of com.evolveum.midpoint.repo.sql.data.common.RShadow in project midpoint by Evolveum.

the class ExtensionTest method test465ReplaceWholeContainerToNull.

@Test
public void test465ReplaceWholeContainerToNull() throws Exception {
    OperationResult result = new OperationResult(ExtensionTest.class.getName() + ".test465ReplaceWholeContainerToNull");
    ObjectDelta<ShadowType> delta = getPrismContext().deltaFor(ShadowType.class).item(ShadowType.F_ATTRIBUTES).replace().asObjectDelta("");
    delta.applyTo(expectedShadow);
    queryListener.start();
    repositoryService.modifyObject(ShadowType.class, shadowOid, delta.getModifications(), getOptions(), result);
    queryListener.dumpAndStop();
    try (Session session = factory.openSession()) {
        RShadow s = session.get(RShadow.class, shadowOid);
        assertExtension(s, itemGroupName);
        assertExtension(s, itemMember);
        assertExtension(s, itemManager);
    }
    assertGetObject(result);
    /*
 [1] select oid from m_object where oid = ? for update
 [1] select rshadow0_.oid as oid1_27_, rshadow0_1_.createChannel as createCh2_27_, rshadow0_1_.createTimestamp as createTi3_27_, rshadow0_1_.creatorRef_relation as creatorR4_27_, rshadow0_1_.creatorRef_targetOid as creatorR5_27_, rshadow0_1_.creatorRef_type as creatorR6_27_, rshadow0_1_.fullObject as fullObje7_27_, rshadow0_1_.lifecycleState as lifecycl8_27_, rshadow0_1_.modifierRef_relation as modifier9_27_, rshadow0_1_.modifierRef_targetOid as modifie10_27_, rshadow0_1_.modifierRef_type as modifie11_27_, rshadow0_1_.modifyChannel as modifyC12_27_, rshadow0_1_.modifyTimestamp as modifyT13_27_, rshadow0_1_.name_norm as name_no14_27_, rshadow0_1_.name_orig as name_or15_27_, rshadow0_1_.objectTypeClass as objectT16_27_, rshadow0_1_.tenantRef_relation as tenantR17_27_, rshadow0_1_.tenantRef_targetOid as tenantR18_27_, rshadow0_1_.tenantRef_type as tenantR19_27_, rshadow0_1_.version as version20_27_, rshadow0_.attemptNumber as attemptN1_41_, rshadow0_.dead as dead2_41_, rshadow0_.exist as exist3_41_, rshadow0_.failedOperationType as failedOp4_41_, rshadow0_.fullSynchronizationTimestamp as fullSync5_41_, rshadow0_.intent as intent6_41_, rshadow0_.kind as kind7_41_, rshadow0_.name_norm as name_nor8_41_, rshadow0_.name_orig as name_ori9_41_, rshadow0_.objectClass as objectC10_41_, rshadow0_.pendingOperationCount as pending11_41_, rshadow0_.primaryIdentifierValue as primary12_41_, rshadow0_.resourceRef_relation as resourc13_41_, rshadow0_.resourceRef_targetOid as resourc14_41_, rshadow0_.resourceRef_type as resourc15_41_, rshadow0_.status as status16_41_, rshadow0_.synchronizationSituation as synchro17_41_, rshadow0_.synchronizationTimestamp as synchro18_41_ from m_shadow rshadow0_ inner join m_object rshadow0_1_ on rshadow0_.oid=rshadow0_1_.oid where rshadow0_.oid=?
 [1] select booleans0_.owner_oid as owner_oi2_28_0_, booleans0_.item_id as item_id1_28_0_, booleans0_.ownerType as ownerTyp3_28_0_, booleans0_.booleanValue as booleanV4_28_0_, booleans0_.item_id as item_id1_28_1_, booleans0_.owner_oid as owner_oi2_28_1_, booleans0_.ownerType as ownerTyp3_28_1_, booleans0_.booleanValue as booleanV4_28_1_ from m_object_ext_boolean booleans0_ where booleans0_.owner_oid=?
 [1] select dates0_.owner_oid as owner_oi2_29_0_, dates0_.item_id as item_id1_29_0_, dates0_.ownerType as ownerTyp3_29_0_, dates0_.dateValue as dateValu4_29_0_, dates0_.item_id as item_id1_29_1_, dates0_.owner_oid as owner_oi2_29_1_, dates0_.ownerType as ownerTyp3_29_1_, dates0_.dateValue as dateValu4_29_1_ from m_object_ext_date dates0_ where dates0_.owner_oid=?
 [1] select longs0_.owner_oid as owner_oi2_30_0_, longs0_.item_id as item_id1_30_0_, longs0_.ownerType as ownerTyp3_30_0_, longs0_.longValue as longValu4_30_0_, longs0_.item_id as item_id1_30_1_, longs0_.owner_oid as owner_oi2_30_1_, longs0_.ownerType as ownerTyp3_30_1_, longs0_.longValue as longValu4_30_1_ from m_object_ext_long longs0_ where longs0_.owner_oid=?
 [1] select polys0_.owner_oid as owner_oi2_31_0_, polys0_.item_id as item_id1_31_0_, polys0_.ownerType as ownerTyp3_31_0_, polys0_.orig as orig4_31_0_, polys0_.item_id as item_id1_31_1_, polys0_.owner_oid as owner_oi2_31_1_, polys0_.ownerType as ownerTyp3_31_1_, polys0_.orig as orig4_31_1_, polys0_.norm as norm5_31_1_ from m_object_ext_poly polys0_ where polys0_.owner_oid=?
 [1] select references0_.owner_oid as owner_oi2_32_0_, references0_.item_id as item_id1_32_0_, references0_.ownerType as ownerTyp3_32_0_, references0_.targetoid as targetoi4_32_0_, references0_.item_id as item_id1_32_1_, references0_.owner_oid as owner_oi2_32_1_, references0_.ownerType as ownerTyp3_32_1_, references0_.targetoid as targetoi4_32_1_, references0_.relation as relation5_32_1_, references0_.targetType as targetTy6_32_1_ from m_object_ext_reference references0_ where references0_.owner_oid=?
 [1] select strings0_.owner_oid as owner_oi2_33_0_, strings0_.item_id as item_id1_33_0_, strings0_.ownerType as ownerTyp3_33_0_, strings0_.stringValue as stringVa4_33_0_, strings0_.item_id as item_id1_33_1_, strings0_.owner_oid as owner_oi2_33_1_, strings0_.ownerType as ownerTyp3_33_1_, strings0_.stringValue as stringVa4_33_1_ from m_object_ext_string strings0_ where strings0_.owner_oid=?
 [1] update m_object set createChannel=?, createTimestamp=?, creatorRef_relation=?, creatorRef_targetOid=?, creatorRef_type=?, fullObject=?, lifecycleState=?, modifierRef_relation=?, modifierRef_targetOid=?, modifierRef_type=?, modifyChannel=?, modifyTimestamp=?, name_norm=?, name_orig=?, objectTypeClass=?, tenantRef_relation=?, tenantRef_targetOid=?, tenantRef_type=?, version=? where oid=?
 [5] delete from m_object_ext_string where item_id=? and owner_oid=? and ownerType=? and stringValue=?
         */
    assertCounts(10, 14);
}
Also used : OperationResult(com.evolveum.midpoint.schema.result.OperationResult) RShadow(com.evolveum.midpoint.repo.sql.data.common.RShadow) Session(org.hibernate.Session) Test(org.testng.annotations.Test)

Aggregations

RShadow (com.evolveum.midpoint.repo.sql.data.common.RShadow)18 OperationResult (com.evolveum.midpoint.schema.result.OperationResult)16 Session (org.hibernate.Session)16 Test (org.testng.annotations.Test)16 ItemPath (com.evolveum.midpoint.prism.path.ItemPath)1 RObject (com.evolveum.midpoint.repo.sql.data.common.RObject)1 PrismIdentifierGenerator (com.evolveum.midpoint.repo.sql.util.PrismIdentifierGenerator)1 ShadowType (com.evolveum.midpoint.xml.ns._public.common.common_3.ShadowType)1