Skip to content

Commit d03ffc0

Browse files
job changes + unused method fix
1 parent e2d7d04 commit d03ffc0

3 files changed

Lines changed: 54 additions & 53 deletions

File tree

.github/workflows/cfdeploy.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,12 @@ jobs:
5555
- name: Verify and Checkout Deploy Branch 🔄
5656
run: |
5757
git fetch origin
58-
echo "📂 Verifying 'local_deploy' branch..."
59-
if git rev-parse --verify origin/local_deploy; then
60-
git checkout local_deploy
58+
echo "📂 Verifying 'multi_level_local_deploy' branch..."
59+
if git rev-parse --verify origin/multi_level_local_deploy; then
60+
git checkout multi_level_local_deploy
6161
echo "✅ Branch checked out successfully!"
6262
else
63-
echo "❌ Branch 'local_deploy' not found. Please verify the branch name."
63+
echo "❌ Branch 'multi_level_local_deploy' not found. Please verify the branch name."
6464
exit 1
6565
fi
6666

.github/workflows/multiTenancyDeployLocal.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
- name: Clone the cloud-cap-samples-java repo 🌐
5555
run: |
5656
echo "🔄 Cloning repository..."
57-
git clone --depth 1 --branch local_mtTests https://github.com/vibhutikumar07/cloud-cap-samples-java.git
57+
git clone --depth 1 --branch local_mtTests_mle_fix https://github.com/vibhutikumar07/cloud-cap-samples-java.git
5858
echo "✅ Repository cloned!"
5959
6060
- name: Change directory to cloud-cap-samples-java 📂

sdm/src/main/java/com/sap/cds/sdm/handler/applicationservice/helper/AttachmentsHandlerUtils.java

Lines changed: 49 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -145,54 +145,55 @@ private static boolean isDirectAttachmentTargetAspect(String targetAspect) {
145145
return targetAspect != null && targetAspect.equalsIgnoreCase("sap.attachments.Attachments");
146146
}
147147

148-
public static List<String> getAttachmentEntityPathsWithActualPropertyNames(
149-
CdsModel model, CdsEntity entity, PersistenceService persistenceService) {
150-
try {
151-
List<String> actualPaths = new ArrayList<>();
152-
153-
// Get all compositions from the target entity
154-
entity
155-
.compositions()
156-
.forEach(
157-
composition -> {
158-
String compositionName = composition.getName();
159-
String compositionTargetEntityName = "";
160-
if (composition.getType().isAssociation()) {
161-
CdsAssociationType assocType = (CdsAssociationType) composition.getType();
162-
compositionTargetEntityName = assocType.getTarget().getQualifiedName();
163-
}
164-
165-
// Check if the target entity of this composition has attachments
166-
if (!compositionTargetEntityName.isEmpty()) {
167-
Optional<CdsEntity> targetEntityOpt =
168-
model.findEntity(compositionTargetEntityName);
169-
if (targetEntityOpt.isPresent()) {
170-
CdsEntity targetEntity = targetEntityOpt.get();
171-
172-
// Get attachment paths from the target entity
173-
SDMAssociationCascader cascader = new SDMAssociationCascader();
174-
SDMAttachmentsReader reader =
175-
new SDMAttachmentsReader(cascader, persistenceService);
176-
List<String> attachmentPaths =
177-
reader.getAttachmentEntityPaths(model, targetEntity);
178-
179-
// Transform the paths to use the actual composition property name
180-
for (String attachmentPath : attachmentPaths) {
181-
String actualPath = buildActualPath(entity, compositionName, attachmentPath);
182-
if (actualPath != null) {
183-
actualPaths.add(actualPath);
184-
}
185-
}
186-
}
187-
}
188-
});
189-
190-
return actualPaths;
191-
} catch (Exception e) {
192-
logger.error("Error getting attachment entity paths with actual property names", e);
193-
return new ArrayList<>();
194-
}
195-
}
148+
// public static List<String> getAttachmentEntityPathsWithActualPropertyNames(
149+
// CdsModel model, CdsEntity entity, PersistenceService persistenceService) {
150+
// try {
151+
// List<String> actualPaths = new ArrayList<>();
152+
153+
// // Get all compositions from the target entity
154+
// entity
155+
// .compositions()
156+
// .forEach(
157+
// composition -> {
158+
// String compositionName = composition.getName();
159+
// String compositionTargetEntityName = "";
160+
// if (composition.getType().isAssociation()) {
161+
// CdsAssociationType assocType = (CdsAssociationType) composition.getType();
162+
// compositionTargetEntityName = assocType.getTarget().getQualifiedName();
163+
// }
164+
165+
// // Check if the target entity of this composition has attachments
166+
// if (!compositionTargetEntityName.isEmpty()) {
167+
// Optional<CdsEntity> targetEntityOpt =
168+
// model.findEntity(compositionTargetEntityName);
169+
// if (targetEntityOpt.isPresent()) {
170+
// CdsEntity targetEntity = targetEntityOpt.get();
171+
172+
// // Get attachment paths from the target entity
173+
// SDMAssociationCascader cascader = new SDMAssociationCascader();
174+
// SDMAttachmentsReader reader =
175+
// new SDMAttachmentsReader(cascader, persistenceService);
176+
// List<String> attachmentPaths =
177+
// reader.getAttachmentEntityPaths(model, targetEntity);
178+
179+
// // Transform the paths to use the actual composition property name
180+
// for (String attachmentPath : attachmentPaths) {
181+
// String actualPath = buildActualPath(entity, compositionName,
182+
// attachmentPath);
183+
// if (actualPath != null) {
184+
// actualPaths.add(actualPath);
185+
// }
186+
// }
187+
// }
188+
// }
189+
// });
190+
191+
// return actualPaths;
192+
// } catch (Exception e) {
193+
// logger.error("Error getting attachment entity paths with actual property names", e);
194+
// return new ArrayList<>();
195+
// }
196+
// }
196197

197198
public static List<Map<String, Object>> fetchAttachments(
198199
String targetEntity, Map<String, Object> entity, String attachmentCompositionName) {

0 commit comments

Comments
 (0)