Giter Site home page Giter Site logo

dddlib's People

Contributors

chencao0524 avatar gdyangyu avatar tanyankai avatar tylerchen avatar

dddlib's Issues

The implementation of EntityRepository of JPA (EntityRepositoryJpa) can't save the Entity Object

What steps will reproduce the problem?
1. Create an entity object, such as User.
2. Invoke the save() method of User entity instance.
3. The User entity instance can't persistent into the database and can't 
produce the id.
4. Trace the source of EntityRepositoryJpa implementation of save() method:
  public <T extends Entity> T save(T entity)
  {
    Entity result = (Entity)getEntityManager().merge(entity);
    LOGGER.info("save a entity: " + entity.getClass() + "/" + entity.getId() + ".");
    return result;
  }
5. The problem is the save method use the merge() method but not the persist() 
method to save the new Entity instance. I think the merge method should use to 
update an transient or persist entity instance.
6. I suggest to change the merge() to persist() method, and add one more method 
update() to update/merge entity.

Original issue reported on code.google.com by [email protected] on 14 Sep 2012 at 3:21

executing mvn command failed with exception

steps to repeate

exec: mvn -e -Phsqldb -am -pl dsrouter clean  test-compile

...
[INFO] --- dbunit-maven-plugin:1.0-beta-3:operation (default) @ 
dayatang-commons-spring ---
36023 [main] INFO org.dbunit.database.DatabaseDataSet -
        database name=HSQL Database Engine
        database version=2.0.0
        database major version=2
        database minor version=0
        jdbc driver name=HSQL Database Engine Driver
        jdbc driver version=2.0.0
        jdbc driver major version=2
        jdbc driver minor version=0

36032 [main] INFO org.dbunit.database.DatabaseDataSet - Table 'dictionaries' 
not found in tableMap=org.dbunit.dataset.Or
deredTableNameMap[_tableNames=[], _tableMap={}, _caseSensitiveTableNames=false]
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Dayatang Commons Project .......................... SUCCESS [0.809s]
[INFO] Dayatang Common API Interfaces and Base Classes ... SUCCESS [2.933s]
[INFO] Test base classes ................................. SUCCESS [2.147s]
[INFO] Dayatang Persistence API implemented by Hibernate . SUCCESS [23.810s]
[INFO] Dayatang Common API implemented by Springframework  FAILURE [35.645s]
[INFO] Dayatang Database Utils ........................... SKIPPED
[INFO] Dayatang Commons QueryChannel Module .............. SKIPPED
[INFO] Dayatang Test classes for spring .................. SKIPPED
[INFO] Dayatang Datasource Router classes for spring ..... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1:06.340s
[INFO] Finished at: Thu Oct 06 22:40:23 CEST 2011
22:40:24,069  INFO org.hibernate.connection.DriverManagerConnectionProvider - 
cleaning up connection pool: jdbc:hsqldb:C
:\\devel\\projects\\dddlib\\spring/target/testdb;shutdown=true
[INFO] Final Memory: 14M/33M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal 
org.codehaus.mojo:dbunit-maven-plugin:1.0-beta-3:operation (default) on project 
dayatang-
commons-spring: Error executing database operation: CLEAN_INSERT: dictionaries 
-> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal 
org.codehaus.mojo:dbunit-maven-plugin:1.0
-beta-3:operation (default) on project dayatang-commons-spring: Error executing 
database operation: CLEAN_INSERT
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoExecutionException: Error executing 
database operation: CLEAN_INSERT
        at org.codehaus.mojo.dbunit.OperationMojo.execute(OperationMojo.java:109)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
        ... 19 more
Caused by: org.dbunit.dataset.NoSuchTableException: dictionaries
        at org.dbunit.database.DatabaseDataSet.getTableMetaData(DatabaseDataSet.java:281)
        at org.dbunit.operation.DeleteAllOperation.execute(DeleteAllOperation.java:109)
        at org.dbunit.operation.CompositeOperation.execute(CompositeOperation.java:79)
        at org.dbunit.ant.Operation.execute(Operation.java:195)
        at org.codehaus.mojo.dbunit.OperationMojo.execute(OperationMojo.java:100)
        ... 21 more

Original issue reported on code.google.com by [email protected] on 6 Oct 2011 at 8:48

Change default spring configurations loading location method from "private static" to "protected"

What steps will reproduce the problem?
1. com.dayatang.springtest.AbstractIntegratedTestCase.springXmlPath

What is the expected output? What do you see instead?
Change default spring configurations loading location method from "private 
static" to "protected". So I can load my owned spring configuration from 
different locations.

Original issue reported on code.google.com by [email protected] on 3 Nov 2011 at 6:51

Change com.dayatang.dbunit.Dbunit to support other databases, such as hsqldb

What steps will reproduce the problem?
1. Change com.dayatang.dbunit.Dbunit to support other databases, such as hsqldb

What is the expected output? What do you see instead?
com.dayatang.dbunit.Dbunit only support mysql, oracle, h2, when someone wants 
to use other databases such as hsqldb, and then will get a RuntimeException 
with error message  "不支持的数据库类型!". 
I think when someone use other database for testing, the DBunit will return a 
default DataSourceDatabaseTester, such as "databaseTester = new 
DataSourceDatabaseTester(ds);".


Original issue reported on code.google.com by [email protected] on 3 Nov 2011 at 7:41

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.