Hi Lukas,

I am designing a DB where I have the columns below.

[image: Screen Shot 2020-02-26 at 3.45.56 PM.png] <about:invalid#zClosurez>

















There is a nightly build which is basically pulling data from another 
system and entering records to this DB. I am doing a batch insert of 
records. 

public boolean createTopicPages(List<TopicPage> topicPages) {
    List<TopicPageRecord> topicPageRecords = new ArrayList<>(topicPages.size());
    topicPages.stream().forEach(topicPage -> {
        TopicPageRecord topicPageRecord = new TopicPageRecord();
        topicPageRecord.setTaxonomyId(topicPage.getTaxonomyId());
        topicPageRecord.setCmsName(topicPage.getCmsName());
        topicPageRecord.setSubject(topicPage.getSubject());
        topicPageRecord.setClassification(topicPage.getClassification());
        topicPageRecord.setEntryName(topicPage.getEntryName());
        topicPageRecord.setStatus(topicPage.getStatus());
        topicPageRecord.setEntryUpdated(topicPage.getEntryUpdated());
        topicPageRecord.setEntryPublished(topicPage.getEntryPublished());
        topicPageRecords.add(topicPageRecord);
    });
    int[] execute = dsl.batchInsert(topicPageRecords).execute();
    return execute.length > 0;
}


Now the problem is, when every time pull records and trying to entry in the 
DB , there will be already exiting entries already in the DB. And I have 
made *cms_name & entry_name* column as unique. So it is breaking when I am 
trying to enter the records which are already in the DB due to the 
uniqueness.  

My requirement is I should ignore the records, if there is no change to 
*entry_updated 
OR status *value. How can I achieve that using Jooq query and how to design 
my query. If you have any sample reference for such kind of requirements 
please pass me here.


Thanks,
Deba

-- 
You received this message because you are subscribed to the Google Groups "jOOQ 
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jooq-user/08fdf926-45b8-4c30-8708-7aa510d23012%40googlegroups.com.

Reply via email to