0
votes

Here is the code:

public void storePartner(PartnerInfo partner) throws ConnectionException {
    EntityManager entityManager = entityManagerFactory.createEntityManager();
    entityManager.persist(partner);
    entityManager.flush();
    entityManager.close();
    entityManagerFactory.close();
}

Here is the entity class:

    @Entity
@Table(name="partners", schema = "myapp@myapp")
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class PartnerInfo {
    @Id
    private String type;

    @XmlElement(name="description")
    @Column(name="description")
    private String description;

    @XmlElement(name="code")
    @Column(name="code")
    private String code;

    @Column(name="image")
    @XmlElement(name = "image")
    private String imageUrl;

So, when I got new object PartnerInfo - everything is going well - I can find my new object in the cassandra database. But when I update object - for example, change only description - it stays unmodified. Why? How can I solve UPDATING with kundera and cassandra?

Kundera version: 2.6

1

1 Answers

0
votes

Solved by myself. The problem was in timestamp column. All my entries in the database were added with cassandra-cli. So, timestamps for columns were 13-digits value. When I add something with kundera - it sets timestamp like 10-digit unix timestamp. So, all new objects are "younger".

SO, this problem can be marked as solved. Will fix new problem - why timestamp formats is different... Thanks to all.