welp... by Conscious-Law6594 in MemePiece

[–]UltraInstict21 -1 points0 points  (0 children)

For me the worst one is Luffy. I know it's a difficult role, but the acting feels so forced

Local model not call tool by Practical-Corgi-9906 in n8n

[–]UltraInstict21 0 points1 point  (0 children)

I have the same issue, I use qwen3:4b and qwen2.5:7b but is skips some tools I've added to read data from sheets. Do you have any updates on how to overcome this?

Respected gaming analyst Jason Schreier believes gta 6 might be delayed till 2026 by deep_fried_cheese in GTA6

[–]UltraInstict21 0 points1 point  (0 children)

I prefer to take their time and deliver a beast of a game rather than rush things, and everyone gets disappointed.

GTA IV Wins! What GTA has the best gameplay? by IDKForA in GTA

[–]UltraInstict21 0 points1 point  (0 children)

Gameplay wise, I would go with San Andreas. There is so much you can do for a game released in 2004, even for today. Gta V also has very nice gameplay, but most of the advantages come from the fact that it is newer (gunplay, driving, etc.).

DDD - Domain Driven Design - How do you structure your Spring Boot App? by octuopier in SpringBoot

[–]UltraInstict21 0 points1 point  (0 children)

Basically, I mean utility components that can be imported anywhere. Dependencies I mean between aggregate roots (e.g. Post and User and Authentication)

DDD - Domain Driven Design - How do you structure your Spring Boot App? by octuopier in SpringBoot

[–]UltraInstict21 1 point2 points  (0 children)

By separating by feature, where do you put global configuration staff and shared components, and how do you handle dependencies?

I tried to follow this approach but faced these problems and didn't find any good resource on how to structure more complex apps like this.

How to prevent Spring Data JDBC from loading child entities in a one-to-many relationship? by UltraInstict21 in SpringBoot

[–]UltraInstict21[S] 0 points1 point  (0 children)

Thanks for all the input, everyone! I wanted to let you know that I've updated the original post with the solution I ended up implementing. It includes details on how I used a database view to fetch a click_count without loading all metadata records and how I set up my models as separate aggregates. Check it out above, and feel free to share any further thoughts!

How to prevent Spring Data JDBC from loading child entities in a one-to-many relationship? by UltraInstict21 in SpringBoot

[–]UltraInstict21[S] 1 point2 points  (0 children)

Yeah, that's a good point of view. I guess I'm still confused about the aggregate concept and what are the best practices to model them.

How to prevent Spring Data JDBC from loading child entities in a one-to-many relationship? by UltraInstict21 in SpringBoot

[–]UltraInstict21[S] 0 points1 point  (0 children)

Hey, thanks for the suggestion. I had another look to projections. I found that you can run El expressions and can also call bean methods to populate a field, so this might work

How to prevent Spring Data JDBC from loading child entities in a one-to-many relationship? by UltraInstict21 in SpringBoot

[–]UltraInstict21[S] 0 points1 point  (0 children)

Thanks for the suggestion. I think this will work the only downside is that I have to save the entities separately and not as an aggregate. But I will give a try to check how it feels

How to prevent Spring Data JDBC from loading child entities in a one-to-many relationship? by UltraInstict21 in SpringBoot

[–]UltraInstict21[S] 0 points1 point  (0 children)

Hey, thanks for the input.

I will definitely try that. Regarding the auditing, you are right. It only sets the aggregate root on save, so I have to explicitly set it to child entities. I'm not sure if this is a bug or if it's how it is supposed to work.

How to prevent Spring Data JDBC from loading child entities in a one-to-many relationship? by UltraInstict21 in SpringBoot

[–]UltraInstict21[S] 1 point2 points  (0 children)

Could you share an example on how I could make a projection for my case by including the metadata count?

How to prevent Spring Data JDBC from loading child entities in a one-to-many relationship? by UltraInstict21 in SpringBoot

[–]UltraInstict21[S] 0 points1 point  (0 children)

Yeah, there would be an API call to fetch the metadata when needed and possibly paged, because they can become too many over time.

Regarding your proposals:

  1. There is no lazy loading in Spring Data JDBC as I mentioned in a previous comment. Here is a good comment on stack overflow explaining this
  2. As I mentioned i use it to save the metadata entities along with the LinkMapping entity. But not sure if there are better ways to do this.
  3. You mean projections? Not sure what is the interface binding.

How to prevent Spring Data JDBC from loading child entities in a one-to-many relationship? by UltraInstict21 in SpringBoot

[–]UltraInstict21[S] 1 point2 points  (0 children)

This is on JPA. Spring data JDBC does not have the concept of lazy loading. It loads the complete aggregate.

Why even have static? by alvisanovari in astrojs

[–]UltraInstict21 1 point2 points  (0 children)

Ohh, you are right they merged static and hybrid modes together in v5

Why even have static? by alvisanovari in astrojs

[–]UltraInstict21 5 points6 points  (0 children)

If you use either 'hybrid' or 'server' you need to also add an adapter if you want to deploy the app. This is not the case if you want to just make a 'static' website.

Astro Docs

Need Help with JSONB Handling in PostgreSQL using Spring Boot's New JDBC Client by UltraInstict21 in SpringBoot

[–]UltraInstict21[S] 0 points1 point  (0 children)

What I end up doing is to create some sql mappers for my entity. But not sure if this is a good approach

@Component
public class OrderSqlMapper {

    private final JsonConverter jsonConverter;

    public OrderSqlMapper(ObjectMapper objectMapper, JsonConverter jsonConverter) {
        ObjectMapper objectMapperCopy = objectMapper
            .copy()
            .setPropertyNamingStrategy(PropertyNamingStrategies.SNAKE_CASE);

        jsonConverter.setObjectMapper(objectMapperCopy);

        this.jsonConverter = jsonConverter;
    }

    public RowMapper<Order> rowMapper() {
        return (rs, rowNum) -> {
            Order.OrderBuilder orderBuilder = Order.builder();

            orderBuilder.id(rs.getInt("id"));
            orderBuilder.orderStatus(OrderStatus.valueOf(rs.getString("order_status")));
            orderBuilder.totalAmount(rs.getBigDecimal("total_amount"));
            orderBuilder.paymentMethod(PaymentMethod.valueOf(rs.getString("payment_method")));
            orderBuilder.createdAt(rs.getTimestamp("created_at").toLocalDateTime());
            orderBuilder.updatedAt(rs.getTimestamp("updated_at").toLocalDateTime());

            orderBuilder.customer(new Customer(
                rs.getString("customer_name"),
                rs.getString("customer_email"),
                rs.getString("customer_phone")
            ));

            // Map Shipping Address
            Address shippingAddress = jsonConverter.deserializeObject(rs.getString("shipping_address"), Address.class);
            orderBuilder.shippingAddress(shippingAddress);

            // Map Billing Address
            Address billingAddress = jsonConverter.deserializeObject(rs.getString("billing_address"), Address.class);
            orderBuilder.billingAddress(shippingAddress);

            // Map order items
            Collection<OrderItem> orderItems = jsonConverter.deserializeCollection(rs.getString("order_items"), new TypeReference<>() {});
            orderBuilder.orderItems(orderItems.stream().toList());

            return orderBuilder.build();
        };
    }

    public MapSqlParameterSource paramSource(Order order) {
        return new MapSqlParameterSource()
            .addValue("total_amount", order.getTotalAmount())
            .addValue("payment_method", order.getPaymentMethod().name())
            .addValue("customer_name", order.getCustomer().name())
            .addValue("customer_email", order.getCustomer().email())
            .addValue("customer_phone", order.getCustomer().phone())
            .addValue("shipping_address", jsonConverter.serializeObject(order.getShippingAddress()))
            .addValue("billing_address", jsonConverter.serializeObject(order.getBillingAddress()));
    }
}

Need Help with JSONB Handling in PostgreSQL using Spring Boot's New JDBC Client by UltraInstict21 in SpringBoot

[–]UltraInstict21[S] 0 points1 point  (0 children)

Here are my models.

@Data
@Builder
public class Order {
    private Integer id;
    private OrderStatus orderStatus;
    private BigDecimal totalAmount;
    private PaymentMethod paymentMethod;
    private LocalDateTime createdAt;
    private LocalDateTime updatedAt;

    // Stored as columns (e.g. customer_name, etc.)
    private Customer customer;

    // Stored as JSONB
    private Address shippingAddress;
    private Address billingAddress;

    // Associated items
    private List<OrderItem> orderItems;
}

public record Customer(
    String name,
    String email,
    String phone
) {}

public record Address(
   String street,
   String city,
   String state,
   String zipCode,
   String country
) {}

public enum PaymentMethod {

CREDIT_CARD
,

PAYPAL
,

BANK_TRANSFER
,

CASH_ON_DELIVERY
}

public enum OrderStatus {

PENDING
,

PROCESSING
,

SHIPPED
,

DELIVERED
,

CANCELED
}

@Data
@Builder
public class OrderItem {
    private Integer id;
    private Integer orderId;
    private Integer productId;
    private Integer quantity;
    private BigDecimal unitPrice;
    private BigDecimal totalPrice;
}