Fix naming-convension-error in ArticleOffer
This commit is contained in:
		@ -20,5 +20,5 @@ public class ArticleOffer {
 | 
			
		||||
 | 
			
		||||
    public int vatPercent;
 | 
			
		||||
 | 
			
		||||
    public boolean should_be_advertised;
 | 
			
		||||
    public boolean shouldBeAdvertised;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -27,6 +27,7 @@ public class WarehouseBooking {
 | 
			
		||||
    )
 | 
			
		||||
    public List<WarehouseBookingPosition> positions = new ArrayList<>();
 | 
			
		||||
 | 
			
		||||
    // TODO FIX ME
 | 
			
		||||
    @OneToOne(optional = false, cascade = CascadeType.ALL)
 | 
			
		||||
    public BookingReason reason;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -1,14 +1,12 @@
 | 
			
		||||
package org.hso.ecommerce.repos.shop;
 | 
			
		||||
 | 
			
		||||
import org.hso.ecommerce.entities.shop.Article;
 | 
			
		||||
import org.hso.ecommerce.entities.user.User;
 | 
			
		||||
import org.springframework.data.jpa.repository.JpaRepository;
 | 
			
		||||
import org.springframework.data.jpa.repository.Query;
 | 
			
		||||
import org.springframework.data.repository.query.Param;
 | 
			
		||||
import org.springframework.stereotype.Repository;
 | 
			
		||||
 | 
			
		||||
import java.util.List;
 | 
			
		||||
import java.util.Optional;
 | 
			
		||||
 | 
			
		||||
@Repository
 | 
			
		||||
public interface ArticleRepository extends JpaRepository<Article, Long> {
 | 
			
		||||
@ -17,7 +15,7 @@ public interface ArticleRepository extends JpaRepository<Article, Long> {
 | 
			
		||||
    Article findArticleById(@Param("articleId") long articleId);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    @Query("SELECT a FROM Article a JOIN a.related ao WHERE ao.should_be_advertised = true")
 | 
			
		||||
    @Query("SELECT a FROM Article a JOIN a.related ao WHERE ao.shouldBeAdvertised = true")
 | 
			
		||||
    List<Article> getAdvertisedArticles();
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user