On 2010-07-31 21.01, Paul Merlin wrote:
* Consider not doing table management in the EntityStore. I'm
using LiquiBase in Streamflow for all table management, on an
application level, and it simplifies evolution a lot (which you
can't handle in the current setup). Let the EntityStore focus on
one thing only.
I'm not sure it's valuable here as the ES is really an infrastructure
thing and the current implementation goal is to provide a
_non-cutomizable_ db schema. Maybe we could provide external SQL code
per db vendor to create the schema.
WDYT ?
Well, the thing is that even if you "get it right", some time down the
line you may want to add some extra column. When that time comes it's
easier if the table management is outside of the ES. And for me, who
already uses Liquibase, I prefer to have all my database handling in one
place, as it will coincide with my application versioning.
I could move the Liquibase wrapper from Streamflow into Qi4j, so that
you guys can use it as well.
* Does the entity table include a version column? In order to do
proper concurrency checking you pretty much have to, and then use
it on UPDATE calls.
Much like the OptimisticLock VERSION column used by Hibernate. Good
idea. Will do.
Exactly. If data can be read in multiple db transactions into a
UnitOfWork for some time, then having a version column is necessary on
write, to ensure consistency.
* What is the "PK" column for? Isn't it enough with the identity
one?
This idea is to have a PrimaryKey column generated by a sequence in
the underlying database to prevent concurency issues and to keep the
db index small and fast. Curently the PK is generated in java code
until we sort out entitystore/indexing syncronism. I'll let Stanislav
answer more precisely on this one if needed.
When is it used? Why does it have to be indexed?
* Please use SLF4J for logging instead of System.out.
Part of the code is already using slf4j, we will make sure it is
everywhere.
Excellent!
/Rickard
_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev