Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Bartosz Walacik
    @bartoszwalacik
    typically , Spring's Tx Manager
    Andrei Amariei
    @andreiamariei
    While working on a fix for javers/javers#855 I made two observations:
    1. CommitId.valueOf(BigDecimal) and CommitId.valueOf(String) handle negative majorIds differently, but are such majorIds even supported?
    2. MongoDB tests didn't run originally on my windows machine (jdk10), upgrading embeddedMongo to 2.2.0 fixed this. Is it a known issue/should I raise a PR?
    Bartosz Walacik
    @bartoszwalacik
    @andreiamariei 1. CommitId major and minor numbers are always positive, so that should'n be a problem, 2. yes please :)
    and thanks for your high quality contribution, I'm merging now
    btw. Andrei Amariei your commit to Javers is not linked with your github account (different email). You can fix it easily, and then you will be automatically listed on javers.org as a contributor
    Andrei Amariei
    @andreiamariei
    @bartoszwalacik thanks for letting me know about the email issue, and for javers in general.
    When can we expect the new version to be released?
    ndsurendra
    @ndsurendra
    Hi, any thoughts on this?
    Bartosz Walacik
    @bartoszwalacik
    @andreiamariei 5.6.1 has been just released
    Philipp Knobel
    @philnate
    Hi, is it possible to configure javers to have for each map change a separate change property created?
    Right now (with kind of vanilla javers) changed_properties only contains the map property as changed but not it's contents.
    Motivation: Javers isn't running in the local application owning the Java classes but rather is a standalone application serving multiple systems. Intention is that the application hosting javers is only receiving JSON serializations of the objects to audit. So a generic entity is used for all classes served.
    Bartosz Walacik
    @bartoszwalacik
    well, you are asking
    if one property can produce more than one PropertyChanges?
    why map Ele
    Bartosz Walacik
    @bartoszwalacik
    why List<ContainerElementChange> is not enough?
    Philipp Knobel
    @philnate
    You mean for a CustomPropertyComparator or where would I use this? I tried to use a CustomPropertyComparator<Map, List<PropertyChange>> but CPC is constraint to be only a single PropertyChange.
    This is what I currently use:
    return TransactionalJaversBuilder.javers()
                                             .withTxManager( transactionManager )
                                             .registerValueWithCustomToString( AuditlogEntryPO.ObjectId.class, oid ->
                                                 oid.svcId() + "/" + oid.typeId() + "/" + oid.oId() )
                                             .registerCustomComparator( new AuditlogEntryPOComparator(), Map.class )
                                             .registerJaversRepository( sqlRepository )
                                             .withObjectAccessHook( new HibernateUnproxyObjectAccessHook() )
                                             .withProperties( javersSqlProperties )
                                             .build();
    Bartosz Walacik
    @bartoszwalacik
    well, I cant say much without a runnable test case, I dont know why you are using CustomPropertyComparator and not a default comparator for Maps
    consider writing a test case, in order to clarify your question, see https://github.com/javers/javers/tree/master/javers-core/src/test/groovy/org/javers/core/cases
    Philipp Knobel
    @philnate
    Maybe I'm looking at the wrong spot. I'm using the sql implementation and inside the jv_snapshot table there's the column changed_properties, which I want to contain the map changed properties as well not just the map. This is basically what I'm trying to do
    Bartosz Walacik
    @bartoszwalacik
    ?
    i dont get it
    did you checked how Snapshot class is designed?
    changedProperties is just a list of names
    it not a snapshot body
    Philipp Knobel
    @philnate
    I know. What I want to achieve is to "trick" javers into thinking that for a Map<String, Object>, where object is effectively either String or another Map<String, Object> to behave as if it actually defined properties of a Class at hand. So assume for the given map {"property": "value", "nested": {"inner": "value"}} an updated version looks as: {"property": "new", "nested": {"inner": "new Value"}}. As of today the changed properties reported by javers will be ["property","nested"] where I would like to see for the changed properties this ["property", "nested.inner"] or something like this. I'm not interested in the actual state of the snapshot, but I need for searches to know which properties of the map changed. Not only that the map changed at all.
    Bartosz Walacik
    @bartoszwalacik
    javers is designed to compare domain entities. If you have unmodeled data like js object or json -- javers isnt for you
    Philipp Knobel
    @philnate
    okay thanks for clarifying
    ndsurendra
    @ndsurendra
    Hi, any thoughts on this?
    Would it help to have this feature in javers?
    Bartosz Walacik
    @bartoszwalacik
    Definetly no, javers persists snapshots
    ndsurendra
    @ndsurendra

    Definetly no, javers persists snapshots

    ok. But, do you agree that this can be an issue for applications where there are frequent updates. The DB size could grow very quickly? Is a snapshot based audit library a bad choice for such applications?

    Bartosz Walacik
    @bartoszwalacik
    No, I dont agree. When you are using MongoDB, collection size is not a problem. Moreover, you probably don't need to audit all your data, but only core domain entities.
    ndsurendra
    @ndsurendra
    Oh, is it possible to store the actual entities in Postgres DB and the javers data (snapshots) in Mongo DB, so that I can avoid the huge DB size problem?
    ndsurendra
    @ndsurendra
    Or are you saying, the size is not a problem only if the entities themselves are stored in MongoDB?
    Bartosz Walacik
    @bartoszwalacik
    thats what people do with big data - no sql databases
    Ravi Raja Reddy
    @raviraja.reddy_gitlab
    Hey guys, I have posted a question at Stack, if anyone of you guys can help it would be great. https://stackoverflow.com/questions/57075758/add-property-to-changes-list-even-if-they-are-same-javers
    Bartosz Walacik
    @bartoszwalacik
    I know, you need to wait
    Ali Mujthaba
    @a-mujthaba321
    How do I enable nvarhcar for jv_snapshot columns because my data is not in English?
    Bartosz Walacik
    @bartoszwalacik
    i don't understand, Strings in java are encoded in UTF-8
    Ali Mujthaba
    @a-mujthaba321
    I am using SQL Server and when i check the db the json in state column of jv_snapshot table shows question marks for non-english text
    Ali Mujthaba
    @a-mujthaba321
    I think this is related to SQL server. When using hibernate we need to annotate fields having unicode characters as @Nationalized to store the unicode characters properly
    Bartosz Walacik
    @bartoszwalacik
    SQL server does not handle UTF-8 properly by default?
    Ali Mujthaba
    @a-mujthaba321
    No
    Not unless you mark the column type as nvarchar
    Razi007
    @Razi007
    please review my suggestions here javers/javers#797
    Bartosz Walacik
    @bartoszwalacik
    @Razi007 will do. I'm on holiday
    Razi007
    @Razi007
    thanks.