Rag...JN 🌌 🦡 👽 💰 🐊
Rag...JN 🌌 🦡 👽 💰 🐊
Explore posts from servers
JCHJava Community | Help. Code. Learn.
Created by Rag...JN 🌌 🦡 👽 💰 🐊 on 12/18/2024 in #java-help
How to set UUID as a primary key, and make an entry?
No description
10 replies
JCHJava Community | Help. Code. Learn.
Created by Rag...JN 🌌 🦡 👽 💰 🐊 on 12/18/2024 in #java-help
How to set UUID as a primary key, and make an entry?
ok I found the solution
10 replies
JCHJava Community | Help. Code. Learn.
Created by Rag...JN 🌌 🦡 👽 💰 🐊 on 12/18/2024 in #java-help
How to set UUID as a primary key, and make an entry?
I use webflux
10 replies
JCHJava Community | Help. Code. Learn.
Created by Rag...JN 🌌 🦡 👽 💰 🐊 on 12/18/2024 in #java-help
How to set UUID as a primary key, and make an entry?
If I tried to set manually (by uncommenting the lines)
Failed to update table [restaurant_group]; Row with Id [d3d8d8dd-305f-4cda-9e69-0d764d66837b] does not exist",
Failed to update table [restaurant_group]; Row with Id [d3d8d8dd-305f-4cda-9e69-0d764d66837b] does not exist",
10 replies
JCHJava Community | Help. Code. Learn.
Created by Rag...JN 🌌 🦡 👽 💰 🐊 on 12/18/2024 in #java-help
How to set UUID as a primary key, and make an entry?
It throws error as null value in column \"id\" of relation \"restaurant_group\" violates not-null constraint"
10 replies
JCHJava Community | Help. Code. Learn.
Created by Rag...JN 🌌 🦡 👽 💰 🐊 on 12/18/2024 in #java-help
How to set UUID as a primary key, and make an entry?
So if I tried to do this (without setting UUID manually)
@Override
public Mono<RestaurantGroup> createRestaurantGroup(String userId, RestaurantGroupCreateDTO restaurantGroupCreateDTO) {
RestaurantGroup restaurantGroup = RestaurantGroupMapper.restaurantGroupCreateDTOToRestaurantGroup(restaurantGroupCreateDTO);
// UUID uuid = UUID.randomUUID();
// restaurantGroup.setId(uuid);
return restaurantGroupRepository.save(restaurantGroup);
}
@Override
public Mono<RestaurantGroup> createRestaurantGroup(String userId, RestaurantGroupCreateDTO restaurantGroupCreateDTO) {
RestaurantGroup restaurantGroup = RestaurantGroupMapper.restaurantGroupCreateDTOToRestaurantGroup(restaurantGroupCreateDTO);
// UUID uuid = UUID.randomUUID();
// restaurantGroup.setId(uuid);
return restaurantGroupRepository.save(restaurantGroup);
}
10 replies
JCHJava Community | Help. Code. Learn.
Created by Rag...JN 🌌 🦡 👽 💰 🐊 on 12/10/2024 in #java-help
Transforming the Springboot Postgres to MySQL having some serious issues.
Error
Hibernate:
alter table business_group
drop
foreign key FKshjv291jkjsvi1hmjsqthmofa
Hibernate:
alter table hotel
drop
foreign key FK2h3jjjxm170fkkco3r9rbhshn
2024-12-10 15:44:21 - GenerationTarget encountered exception accepting command : Error executing DDL "
alter table hotel
drop
foreign key FK2h3jjjxm170fkkco3r9rbhshn" via JDBC [Table 'my-city.hotel' doesn't exist]
org.hibernate.tool.schema.spi.CommandAcceptanceException: Error executing DDL "
alter table hotel
drop
foreign key FK2h3jjjxm170fkkco3r9rbhshn" via JDBC [Table 'my-city.hotel' doesn't exist]
Hibernate:
alter table business_group
drop
foreign key FKshjv291jkjsvi1hmjsqthmofa
Hibernate:
alter table hotel
drop
foreign key FK2h3jjjxm170fkkco3r9rbhshn
2024-12-10 15:44:21 - GenerationTarget encountered exception accepting command : Error executing DDL "
alter table hotel
drop
foreign key FK2h3jjjxm170fkkco3r9rbhshn" via JDBC [Table 'my-city.hotel' doesn't exist]
org.hibernate.tool.schema.spi.CommandAcceptanceException: Error executing DDL "
alter table hotel
drop
foreign key FK2h3jjjxm170fkkco3r9rbhshn" via JDBC [Table 'my-city.hotel' doesn't exist]
6 replies
JCHJava Community | Help. Code. Learn.
Created by Rag...JN 🌌 🦡 👽 💰 🐊 on 12/10/2024 in #java-help
Transforming the Springboot Postgres to MySQL having some serious issues.
@Entity
@Data
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "business_group")
public class BusinessGroup {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Long id;

private String name;

private BusinessType businessType;
private String description;
private String location;
private Double latitude;
private Double longitude;

@ManyToOne
@JoinColumn(name = "client_id")
private Client client;

@Temporal(TemporalType.TIMESTAMP)
@CreationTimestamp
@Column(updatable = false)
private Date createdDateTime;

private String createdBy;
}
@Entity
@Data
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "business_group")
public class BusinessGroup {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Long id;

private String name;

private BusinessType businessType;
private String description;
private String location;
private Double latitude;
private Double longitude;

@ManyToOne
@JoinColumn(name = "client_id")
private Client client;

@Temporal(TemporalType.TIMESTAMP)
@CreationTimestamp
@Column(updatable = false)
private Date createdDateTime;

private String createdBy;
}
@Entity
@Data
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "hotel")
public class Hotel {
// @GeneratedValue(strategy = GenerationType.AUTO, generator = "hotel_seq")
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Long id;
// @SequenceGenerator(name = "hotel_seq", sequenceName = "hotel_seq", allocationSize = 1)

private String name;
private String description;
private String location;


@JsonSerialize(using = PointToJsonSerializer.class)
// @Column(columnDefinition = "geometry(Point,4326)")
private Point geoLocation;

@ManyToOne
@JoinColumn(name = "business_group_id")
private BusinessGroup businessGroup;

@Temporal(TemporalType.TIMESTAMP)
@CreationTimestamp
@Column(updatable = false)
private Date createdDateTime;

@Temporal(TemporalType.TIMESTAMP)
@CreationTimestamp
private Date updatedDateTime;

private String createdBy;

private String updatedBy;

@Entity
@Data
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "hotel")
public class Hotel {
// @GeneratedValue(strategy = GenerationType.AUTO, generator = "hotel_seq")
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Long id;
// @SequenceGenerator(name = "hotel_seq", sequenceName = "hotel_seq", allocationSize = 1)

private String name;
private String description;
private String location;


@JsonSerialize(using = PointToJsonSerializer.class)
// @Column(columnDefinition = "geometry(Point,4326)")
private Point geoLocation;

@ManyToOne
@JoinColumn(name = "business_group_id")
private BusinessGroup businessGroup;

@Temporal(TemporalType.TIMESTAMP)
@CreationTimestamp
@Column(updatable = false)
private Date createdDateTime;

@Temporal(TemporalType.TIMESTAMP)
@CreationTimestamp
private Date updatedDateTime;

private String createdBy;

private String updatedBy;

It has moe tables but this is the first error
6 replies
JCHJava Community | Help. Code. Learn.
Created by Rag...JN 🌌 🦡 👽 💰 🐊 on 11/11/2024 in #java-help
Deploying my java app to VPS with Github actions and Dockerization
I don't know where to start from?
6 replies
JCHJava Community | Help. Code. Learn.
Created by Rag...JN 🌌 🦡 👽 💰 🐊 on 11/11/2024 in #java-help
Deploying my java app to VPS with Github actions and Dockerization
So I assume I don't have to create any containers in the server, I just have to push this to github, and it will create the container?
6 replies
JCHJava Community | Help. Code. Learn.
Created by Rag...JN 🌌 🦡 👽 💰 🐊 on 10/14/2024 in #java-help
PostGIS distance calculation gives in-accurate results
ah ok
84 replies
JCHJava Community | Help. Code. Learn.
Created by Rag...JN 🌌 🦡 👽 💰 🐊 on 10/14/2024 in #java-help
PostGIS distance calculation gives in-accurate results
what that means really?
84 replies
JCHJava Community | Help. Code. Learn.
Created by Rag...JN 🌌 🦡 👽 💰 🐊 on 10/14/2024 in #java-help
PostGIS distance calculation gives in-accurate results
ah ok.
84 replies
JCHJava Community | Help. Code. Learn.
Created by Rag...JN 🌌 🦡 👽 💰 🐊 on 10/14/2024 in #java-help
PostGIS distance calculation gives in-accurate results
Thank you so much.
84 replies
JCHJava Community | Help. Code. Learn.
Created by Rag...JN 🌌 🦡 👽 💰 🐊 on 10/14/2024 in #java-help
PostGIS distance calculation gives in-accurate results
I mean I just followed the standards
84 replies
JCHJava Community | Help. Code. Learn.
Created by Rag...JN 🌌 🦡 👽 💰 🐊 on 10/14/2024 in #java-help
PostGIS distance calculation gives in-accurate results
it's still my fault right?
84 replies
JCHJava Community | Help. Code. Learn.
Created by Rag...JN 🌌 🦡 👽 💰 🐊 on 10/14/2024 in #java-help
PostGIS distance calculation gives in-accurate results
🙊
84 replies
JCHJava Community | Help. Code. Learn.
Created by Rag...JN 🌌 🦡 👽 💰 🐊 on 10/14/2024 in #java-help
PostGIS distance calculation gives in-accurate results
No description
84 replies
JCHJava Community | Help. Code. Learn.
Created by Rag...JN 🌌 🦡 👽 💰 🐊 on 10/14/2024 in #java-help
PostGIS distance calculation gives in-accurate results
bet
84 replies
JCHJava Community | Help. Code. Learn.
Created by Rag...JN 🌌 🦡 👽 💰 🐊 on 10/14/2024 in #java-help
PostGIS distance calculation gives in-accurate results
how none of them doesn't come close to 8?
84 replies