Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upload Inventory By Vendor #48

Closed
wants to merge 4 commits into from
Closed

Conversation

aditiyars
Copy link
Member

@aditiyars aditiyars commented Jun 11, 2021

Create Unit test
add feature Create Inventory By Vendor on inventory controller
add findyById on seller repository
Create UploadInventoryRequest

close #36

add feature Create Inventory By Vendor on inventory controller
add findyById on seller repository
Create UploadInventoryRequest
@aditiyars aditiyars changed the title Create unit test Upload Inventory By Vendor Jun 11, 2021
Copy link
Member

@lloistborn lloistborn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please check request perubahan dan check conflict

CreateInventory command = new CreateInventory(inventoryRepository);
return command.execute(Optional.ofNullable(item));
command.execute(Optional.of(inventory));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

buat pengecekan jika proses sudah berhasil atau tidak

command.execute(Optional.of(inventory));
BaseResponse baseResponse= new BaseResponse<>();

baseResponse.setMessage("Create Inventory Successfully");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pesan sukses dibuat berdasarkan pengecekan jika proses sudah berhasil

@lloistborn
Copy link
Member

tolong isi

  • bagian Linked Issues
  • bagian Projects

@aditiyars aditiyars linked an issue Jun 12, 2021 that may be closed by this pull request
add feature Create Inventory By Vendor on inventory controller
Create UploadInventoryRequest
add cascade on Inventory for fk_inventory_id
add annotation Column on PhotoInventory for fk_inventory_id
add javax.validation depedency on pom.xml
delete findById on SellerRepository
add annotation @notempty and @positive on UploadInventoryRequest for productName and price
Create unit test
add feature Create Inventory By Vendor on inventory controller
Create UploadInventoryRequest
add cascade on Inventory for fk_inventory_id
add annotation Column on PhotoInventory for fk_inventory_id
add javax.validation depedency on pom.xml
delete findById on SellerRepository
add annotation @notempty and @positive on UploadInventoryRequest for productName and price
merge from dev
add depedency spring validation
@@ -21,7 +24,7 @@
@Column(name = "fk_seller_id")
private Integer fkSellerId;

@OneToMany(targetEntity = PhotoInventory.class)
@OneToMany(targetEntity = PhotoInventory.class, cascade = CascadeType.ALL)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CascadeType.ALL digunakan untuk apa?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cascade type all ini sebenernya bukan bagian dari fitur create inventory tapi cascade type all ini digunakan untuk menghapus/update seluruh data dengan id yang kita pilih

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bisa kasih contoh? @aditiyars

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

contohnya pada satu seller bisa memiliki banyak(lebih dari satu) foto untuk satu seller, kalo gak pake cascade bakal munculin transient exception (TransientObjectException occurs when you save an object which references another object that is transient (meaning it has the "default" identifier value, frequently null) and then flush the Session.)

@lloistborn lloistborn closed this Jul 4, 2021
@lloistborn lloistborn deleted the feature/uploadInventoryByVendor branch July 4, 2021 07:49
@lloistborn
Copy link
Member

closing and get the main implementation for refactoring purpose

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Partner - Upload Inventory
2 participants