How List Entity and clear ID?

I have Entity model.

@Entity @Table(name = "TD_SERVICE_CONFIG") @Getter @Setter public class ServiceConfig { ...     @OneToMany(mappedBy = "serviceConfig", fetch = FetchType.EAGER, cascade = CascadeType.ALL, orphanRemoval = true)     private List<NotificationItem> notificationItems;     @OneToMany(mappedBy = "serviceConfig", fetch = FetchType.LAZY, cascade = CascadeType.ALL, orphanRemoval = true)     private List<QosItem> qosItems;     private Integer version; } 

When I press edit button

public void editServiceConfig(ServiceConfig serviceConfig) {        ...         notificationItems = serviceConfig.getNotificationItems();         qosItems = serviceConfig.getQosItems();         currentVersion = serviceConfig.getVersion() + 1;     } 

But notificationItems has models with not null ID. How can I clone all LIst with entities?

Replay

Category: java Time: 2016-07-29 Views: 0

Related post

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development

search

Front-end development

Database

development tools

Open Platform

Javascript development

.NET development

cloud computing

server

Copyright (C) avrocks.com, All Rights Reserved.

processed in 0.168 (s). 12 q(s)