Skip to content

Add videos field to speaker#118

Open
I-Mircheva wants to merge 4 commits into
bgjug:masterfrom
I-Mircheva:master
Open

Add videos field to speaker#118
I-Mircheva wants to merge 4 commits into
bgjug:masterfrom
I-Mircheva:master

Conversation

@I-Mircheva

Copy link
Copy Markdown

Co-authored-by: AlexLaskin ale.laskintues19@gmail.com
Co-authored-by: MagiMarinova magi.marinowax@gmail.com

I-Mircheva and others added 3 commits July 6, 2018 16:37
Co-authored-by: AlexLaskin <ale.laskintues19@gmail.com>
Co-authored-by: MagiMarinova <magi.marinowax@gmail.com>
Co-authored-by: AlexLaskin <ale.laskintues19@gmail.com>
Co-authored-by: MagiMarinova <magi.marinowax@gmail.com>
Comment thread src/main/java/site/controller/AbstractCfpController.java Outdated

public Speaker saveSpeaker(Speaker speaker){
if(speaker.getVideos() != null)
speaker.setVideos(videoSanitizerService.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing { }

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed formatting and {}

Comment thread src/main/java/site/controller/AbstractCfpController.java Outdated
import org.springframework.stereotype.Service;

@Service
public class VideoSanitizerService {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like Util method for me. Also it doesn't work with a Video actually, it is more like working with a String name.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed: Not a service anymore, but a class StringSanitizer

@Lob
private byte[] picture;

private String videos;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering why did you prefer to have them as comma separated values, instead of a List coming from a 1 to many relation?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • We choose a String field as the forms when working with speaker would become too complicated
  • The admin panel for add/edit a speaker would be inconvenient

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@I-Mircheva can you make videos to be "videoLink" and to be just one URL mapped with

@column(length = 500)
private String videoLink;

for example so we dont need a migrate sql.

Comment thread src/main/java/site/model/Speaker.java Outdated
Comment thread migrate-add-videos.sql Outdated
@@ -0,0 +1 @@
ALTER TABLE USER ADD COLUMN VIDEOS VARCHAR(255); No newline at end of file

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, sometimes URLs are huge and with the comma separated approach 255 might not b enough in some cases

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made it VARCHAR(1024)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@I-Mircheva why do we need this SQL ? The schema should be updated automatically anyway.

Co-authored-by: AlexLaskin ale.laskintues19@gmail.com
Co-authored-by: MagiMarinova magi.marinowax@gmail.com
@gochev gochev self-assigned this May 26, 2019
@gochev

gochev commented May 26, 2019

Copy link
Copy Markdown
Collaborator

Will merge it after jprime 2019 and before the new CFP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants