Das Attribut nicht mit dem angegebenen Namen [xxx] auf diesem ManagedType [xxx] bei pageRequest.of () -Formen zu findenJava

Java-Forum
Anonymous
 Das Attribut nicht mit dem angegebenen Namen [xxx] auf diesem ManagedType [xxx] bei pageRequest.of () -Formen zu finden

Post by Anonymous »

Ich verwende den Camel -Fall in einer Entitätsklasse, aber warum konvertiert die zu lehnte Funktion immer automatisch in den Fall mit niedrigerem Kamel? [com.loader.batch.if.entity.userfllig

Code: Select all

package com.loader.batch.IF.entity;

import jakarta.persistence.*;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

@Entity
@Table(name = "data_flight")
public class UserFlight {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)

@Column(name = "MessageSequenceID", nullable = false)
private Long MessageSequenceID;

@Column(name = "MessageType", length = 30)
private String MessageType;

@Column(name = "ServiceType", length = 30)
private String ServiceType;

@Column(name = "OperationMode", length = 30)
private String OperationMode;

@Column(name = "SendDateTime", length = 30)
private String SendDateTime;

@Column(name = "CreateDateTime", length = 30)
private String CreateDateTime;

public UserFlight(
Long MessageSequenceID,
String MessageType,
String ServiceType,
String OperationMode, String SendDateTime, String CreateDateTime) {
this.MessageSequenceID = MessageSequenceID;
this.MessageType = MessageType;
this.ServiceType = ServiceType;
this.OperationMode = OperationMode;
this.SendDateTime = SendDateTime;
this.CreateDateTime = CreateDateTime;
}

public Long getMessageSequenceID() {
return MessageSequenceID;
}

public void setMessageSequenceID(Long messageSequenceID) {
MessageSequenceID = messageSequenceID;
}

public String getMessageType() {
return MessageType;
}

public void setMessageType(String messageType) {
MessageType = messageType;
}

public String getServiceType() {
return ServiceType;
}

public void setServiceType(String serviceType) {
ServiceType = serviceType;
}

public String getOperationMode() {
return OperationMode;
}

public void setOperationMode(String operationMode) {
OperationMode = operationMode;
}

public String getSendDateTime() {
return SendDateTime;
}

public void setSendDateTime(String sendDateTime) {
SendDateTime = sendDateTime;
}

public String getCreateDateTime() {
return CreateDateTime;
}

public void setCreateDateTime(String createDateTime) {
CreateDateTime = createDateTime;
}

}
< /code>
Und die Dienstklasse ist wie folgt: < /p>
Pageable pageable = PageRequest.of(req.getPage(), req.getLimit(), Sort.by("MessageSequenceID"));

UserFlight userFlight = new UserFlight();
userFlight.setStatus(req.getSearch());
Example example = Example.of(userFlight, SEARCH_CONDITIONS_MATCH_ANY);

var flightData = flightRepository.findAll(example, pageable);
< /code>
und Ausnahme werden angezeigt, da ein vorsichtiges Objekt nicht das Attribut MessageSequenceId: < /p>
gefunden hatorg.springframework.dao.InvalidDataAccessApiUsageException: Unable to locate Attribute with the given name [messageSequenceID] on this ManagedType [com.loader.batch.IF.entity.UserFlight]
Ich bin bereits versucht, Spring.jpa.hibernate.naming.physical-Strategy = org.hiberNate.boot.model.naming.physicalnamingStrategyStandardImpl auf der Anwendung zu addieren. Es verwendet immer noch MessageSequenceId, nicht MessagesequenceId.

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post