Created
April 24, 2020 15:33
-
-
Save chongma/c5501c414f898f501fc04a9339405c5f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // at line 12 scaleFee.getScaleFeeItems() is in the right order but end of transaction does not reflect this | |
| // @OneToMany(mappedBy = "scaleFee", cascade = CascadeType.ALL, orphanRemoval = true) | |
| // @OrderColumn | |
| // private List<ScaleFeeItem> scaleFeeItems; | |
| @Transactional | |
| public boolean createScaleFeeScaleFeeItem(Long id) { | |
| ScaleFee scaleFee = scaleFeeDb.selectScaleFee(id); | |
| if (scaleFee != null) { | |
| ScaleFeeItem scaleFeeItem = new ScaleFeeItem(scaleFee, BigDecimal.ZERO, BigDecimal.ZERO, false); | |
| scaleFee.getScaleFeeItems().add(scaleFeeItem); | |
| Collections.sort(scaleFee.getScaleFeeItems(), new ScaleFeeItemComparator()); | |
| return true; | |
| } | |
| return false; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment