New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sql repository #67
Comments
what about read ? :) |
Still some problems with H2 in mem |
def maxSnapshotPk = SELECT MAX(snapshot_pk) FROM jv_snapshot, jv_global_id, jv_cdo_class WHERE qualified_name = 'org.javers.core.model.SnapshotEntity' LIMIT 2 OFFSET 0 SELECT "jv_commit"."author", "jv_commit"."commit_date", "jv_commit"."commit_id", ""jv_snapshot"."type" FROM "public"."jv_snapshot", "public"."jv_commit" where "jv_commit"."commit_pk" = "jv_snapshot"."commit_fk" AND "jv_snapshot"."snapshot_pk" = maxSnapshotPk SELECT "public"."jv_snapshot_property"."name", "public"."jv_snapshot_property"."value" FROM "public"."jv_snapshot_property" where "public"."jv_snapshot_property"."snapshot_fk" = $fk smth like this ^^ |
btw MAX works fine, it was my mistake ;) |
może i wtedy Snapshot powinien mieć zbudowany commit i propertisy |
Hi |
Hi
if you want to use MS SQL Server it should be implemented in Poly. |
Pawel wanted to say, that we'll add MS SQL support to PolyJDBC after we finished efreet007, would you like to contribute to JaVars and help us with SQL stuff? |
efreet007 please put new issue for MS SQL support |
Done: polyjdbc/polyjdbc#9 |
efreet007 |
@efreet007 |
config example def dbConnection = DriverManager.getConnection("jdbc:h2:tcp://localhost:9092/mem:test")
def connectionProvider = new ConnectionProvider() {
@Override
Connection getConnection() {
return dbConnection
}
}
def sqlRepository = SqlRepositoryBuilder
.sqlRepository()
.withConnectionProvider(connectionProvider)
.withDialect(DialectName.H2).build()
javers = javers().registerJaversRepository(sqlRepository).build() |
Is it possible to use Hibernate Envers in combination with JaVers? Envers can track changes though annotating the classes with
The idea is to pull the changes from the _AUD tables? In combination with spring-data-envers (https://github.com/spring-projects/spring-data-envers) you could get the change-revisions and the you hook on JaVers implementation calculating the difference? |
@igler so envers cant calculate diffs on its own? |
Unfortunately not. You only get a list of revisions by spring-data-envers. So you have to find out the deltas on your own. The idea was if I can submit a list of revisions to JaVers and get a nice JSON-history back? |
@igler maybe we move this new envers thread to a new issue, titled 'javers envers integration'? Your idea sounds good, we can think about read-only JaversRepository implementation (see https://github.com/javers/javers/blob/033fe77817052e4ec71b9014f676c5bfa478cbc8/javers-core/src/main/java/org/javers/repository/api/JaversRepository.java), which would read object snapshots from envers tables. |
OK, moved the discussion to #112. |
@efreet007, @igler, JaversSqlRepository is done and released as 1.1.0-RC1. |
released in v. 1.1.0 |
As a relational database user i want to persists changes in Sql reposioty.
The text was updated successfully, but these errors were encountered: