Spring-Framework-Java-Apps / twitterwall2

Twitterwall with spring:boot for heroku
https://thomaswoehlke.github.io/twitterwall2/
Apache License 2.0
0 stars 0 forks source link

use JPA where possible in TaskRepositoryImpl.deleteAllDomainData() #255

Open phasenraum2010 opened 7 years ago

phasenraum2010 commented 7 years ago

in: org.woehlke.twitterwall.oodm.repositories.custom.impl.TaskRepositoryImpl.deleteAllDomainData() Line 42:

jdbcTemplate should only be used for @ManyToMany Tables

@Override public void deleteAllDomainData() { String SQL_DELETE_ALL_ROWS[] = { "delete from userprofile_url", "delete from userprofile_mention", "delete from userprofile_hashtag", "delete from userprofile_media", "delete from userprofile_tickersymbol", "delete from tweet_tickersymbol", "delete from tweet_mention", "delete from tweet_media", "delete from tweet_hashtag", "delete from tweet_url", "delete from url", "delete from tickersymbol", "delete from mention", "delete from media", "delete from hashtag", "delete from tweet", "delete from userprofile", "delete from userlist", "delete from task_history", "delete from task" }; for(String SQL : SQL_DELETE_ALL_ROWS){ jdbcTemplate.execute(SQL); } }