var id = db.getCollection('first_collection').find({jobClass:"com.example.CleanerJob"}, { _id: 1 }).next()._id;
db.getCollection('second_collection').findOne({"jobId":id});
db.getCollection('first_collection').findOne(id);
Test it on your local. If it is ok, replace all "findOne" with "remove"
RELATED:
quartz and mongo:
org.quartz.JobPersistenceException: Could not load job class [See nested exception: java.lang.ClassNotFoundException:
at com.novemberain.quartz.mongodb.JobConverter.toJobDetail
...
at com.novemberain.quartz.mongodb.MongoDBJobStore.triggersFired
...
Monday, July 17, 2017
Tuesday, July 11, 2017
Wednesday, July 5, 2017
Create one class from another with Stream API
public class User {
public User(
public class UserInfo {
public UserInfo(User log) {
List all = service.getUsers();
List infos = all.stream().map(UserInfo::new).collect(Collectors.toList());
public User(
public class UserInfo {
public UserInfo(User log) {
List
List
Tuesday, July 4, 2017
Rename git branch
Create a new branch from the old one:
git checkout branch_name
git checkout -b new_branch_name
git push --set-upstream origin new_branch_name
Delete the old branch local and remote:
git branch -D branch_name
git push origin --delete branch_name
Possible you want to rebase or squash commits:
git rebase -i master
=happy=
git checkout branch_name
git checkout -b new_branch_name
git push --set-upstream origin new_branch_name
Delete the old branch local and remote:
git branch -D branch_name
git push origin --delete branch_name
Possible you want to rebase or squash commits:
git rebase -i master
=happy=
Subscribe to:
Posts (Atom)