Привет, я делаю систему управления контентом для компании Night Awards, и сейчас я сосредоточен на создании контента и актеров. Это то, что у меня есть до сих пор. < /P>
@Entity
@Data
@Table(name = "cast_crew")
public class Cast {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
private String name;
@Column(columnDefinition = "TEXT")
private String bio;
private String imageUrl;
}
< /code>
@Entity
@Data
public class Content {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
private String title;
@Column(columnDefinition = "TEXT")
private String description;
@Enumerated(EnumType.STRING)
private ContentType contentType;
private String countries;
private String genres;
private String languages;
private boolean featured;
@Enumerated(EnumType.STRING)
private ApprovalStatus approvalStatus = ApprovalStatus.PENDING;
private String portraitImage;
private String landscapeImage;
}
< /code>
Now I want to create a join between them. But the thing is a cast person can have multiple roles in a certain content(say a movie). For example person A in a movie M is a Director, Actor, Writer. How can i create a join like this. This will be a management system so I should be able to manage the different casts in a movie, add new ones, delete existing ones etc. Also I was thinking that I should be able to select from existing casts when editing a content, so would thymeleaf be good for this. If i want to add a complete new cast person to a movie, i will need to create a cast individually then select it in the edit menu for content. Later on I will also need to add entities for the nominations, awards edition etc.
Подробнее здесь: https://stackoverflow.com/questions/797 ... in-springb
Как создать оптимальное соединение с правильным каскадом между двумя субъектами в Springboot для фильма DB ⇐ JAVA
Программисты JAVA общаются здесь
1758443118
Anonymous
Привет, я делаю систему управления контентом для компании Night Awards, и сейчас я сосредоточен на создании контента и актеров. Это то, что у меня есть до сих пор. < /P>
@Entity
@Data
@Table(name = "cast_crew")
public class Cast {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
private String name;
@Column(columnDefinition = "TEXT")
private String bio;
private String imageUrl;
}
< /code>
@Entity
@Data
public class Content {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
private String title;
@Column(columnDefinition = "TEXT")
private String description;
@Enumerated(EnumType.STRING)
private ContentType contentType;
private String countries;
private String genres;
private String languages;
private boolean featured;
@Enumerated(EnumType.STRING)
private ApprovalStatus approvalStatus = ApprovalStatus.PENDING;
private String portraitImage;
private String landscapeImage;
}
< /code>
Now I want to create a join between them. But the thing is a cast person can have multiple roles in a certain content(say a movie). For example person A in a movie M is a Director, Actor, Writer. How can i create a join like this. This will be a management system so I should be able to manage the different casts in a movie, add new ones, delete existing ones etc. Also I was thinking that I should be able to select from existing casts when editing a content, so would thymeleaf be good for this. If i want to add a complete new cast person to a movie, i will need to create a cast individually then select it in the edit menu for content. Later on I will also need to add entities for the nominations, awards edition etc.
Подробнее здесь: [url]https://stackoverflow.com/questions/79770434/how-to-create-a-optimal-join-with-proper-cascade-between-two-entities-in-springb[/url]
Ответить
1 сообщение
• Страница 1 из 1
Перейти
- Кемерово-IT
- ↳ Javascript
- ↳ C#
- ↳ JAVA
- ↳ Elasticsearch aggregation
- ↳ Python
- ↳ Php
- ↳ Android
- ↳ Html
- ↳ Jquery
- ↳ C++
- ↳ IOS
- ↳ CSS
- ↳ Excel
- ↳ Linux
- ↳ Apache
- ↳ MySql
- Детский мир
- Для души
- ↳ Музыкальные инструменты даром
- ↳ Печатная продукция даром
- Внешняя красота и здоровье
- ↳ Одежда и обувь для взрослых даром
- ↳ Товары для здоровья
- ↳ Физкультура и спорт
- Техника - даром!
- ↳ Автомобилистам
- ↳ Компьютерная техника
- ↳ Плиты: газовые и электрические
- ↳ Холодильники
- ↳ Стиральные машины
- ↳ Телевизоры
- ↳ Телефоны, смартфоны, плашеты
- ↳ Швейные машинки
- ↳ Прочая электроника и техника
- ↳ Фототехника
- Ремонт и интерьер
- ↳ Стройматериалы, инструмент
- ↳ Мебель и предметы интерьера даром
- ↳ Cантехника
- Другие темы
- ↳ Разное даром
- ↳ Давай меняться!
- ↳ Отдам\возьму за копеечку
- ↳ Работа и подработка в Кемерове
- ↳ Давай с тобой поговорим...
Мобильная версия