Code Monkey home page Code Monkey logo

batoojpa's People

Contributors

alesj avatar ammachado avatar asimarslan avatar barreiro avatar bobbywalters avatar hceylan avatar kozzi11 avatar lburgazzoli avatar lukaseder avatar mdpinar avatar tolgagokmen avatar ylemoigne avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

batoojpa's Issues

Downgrade asm to 3.3.1

ASM 4.0 is fairly new and conflicts with a number of frameworks.

Downgrading to 3.3.1 is the solution.

Batoo + Postgre schemas + @Table annotation

When I use @table anotation on an entity class, it was created sucessfull, but when i try to make any query, the generated SQL doesn't contains the schema prefix.

Postgre 9.1
Glassfish 3.2
Batoo 0.1.3

Use BoneCP as the datasource manager

Would it be possible to allow pluggable ConnectionPools in the future?
As we use BoneCP in all projects (and we are very happy with it!), this would be a great feature.

QueryDSL like API

As far as I understand the goal was to have JPA compliant ORM implementation.
I guess since BatooJPA is JPA compliant I can use http://www.querydsl.com/ just on top of BatooJPA. But since this adds another layer of abstraction (and sometimes defects) on top of existing ORM I am wondering if it will add some additional overhead in terms of performance.

Have you considered proving proprietary API for more elegant querying? It would make BatooJPA not only the fastest but the easiest to use as well.

Compiler crash when building with JDK 1.6.0_35

Looks similar to an issue in Guava: http://code.google.com/p/guava-libraries/issues/detail?id=950

[INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) @ batoo-jpa ---
[INFO] Compiling 197 source files to D:\BatooOrg-BatooJPA-4373cf3\batoo-jpa\target\classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] Failure executing javac, but could not parse the error:
An exception has occurred in the compiler (1.6.0_35). Please file a bug at the Java Developer Connection (http://java.sun.com/webapps/bugreport)  after checking the Bug Parade for duplicates. Include your program and the following diagnostic in your report.  Thank you.
java.lang.NullPointerException
        at com.sun.tools.javac.comp.Check.checkCompatibleConcretes(Check.java:1213)
        at com.sun.tools.javac.comp.Check.checkCompatibleSupertypes(Check.java:1565)
        at com.sun.tools.javac.comp.Attr.attribClassBody(Attr.java:2674)
        at com.sun.tools.javac.comp.Attr.attribClass(Attr.java:2628)
        at com.sun.tools.javac.comp.Attr.attribClass(Attr.java:2584)
        at com.sun.tools.javac.comp.Attr.attribClass(Attr.java:2584)
        at com.sun.tools.javac.comp.Attr.attribClass(Attr.java:2564)
        at com.sun.tools.javac.main.JavaCompiler.attribute(JavaCompiler.java:1045)
        at com.sun.tools.javac.main.JavaCompiler.compile2(JavaCompiler.java:768)
        at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:730)
        at com.sun.tools.javac.main.Main.compile(Main.java:353)
        at com.sun.tools.javac.main.Main.compile(Main.java:279)
        at com.sun.tools.javac.main.Main.compile(Main.java:270)
        at com.sun.tools.javac.Main.compile(Main.java:87)
        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.compiler.javac.JavacCompiler.compileInProcess0(JavacCompiler.java:551)
        at org.codehaus.plexus.compiler.javac.JavacCompiler.compileInProcess(JavacCompiler.java:526)
        at org.codehaus.plexus.compiler.javac.JavacCompiler.compile(JavacCompiler.java:167)
        at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:678)
        at org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:128)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
        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:320)
        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)

[INFO] 1 error

IdClass does not work as expected

Hi,

using @IdClass in one of our entiy beans produces the exception "org.acme.test.BeanPK does not have a corresponding embeddable type."
The id-class BeanPK is not annotated with any annotations.

class BeankPK {
String name;
String key;
...
}

@entity
@IdClass(BeanPk.class)
class Bean {
@id name;
@id key;
...
}

The same code is working fine in hibernate and should work accoring to JPA-spec 11.1.19 and 2.4

Implement Pluggable Datasource Inlets

A Plugabble datasource implementation that will:

  • Take a class name to be instantiated by means of reflection with constructor of Map<String, String> param
  • That will pass settings in means of java beans reflection

i.e.:

batoo.datasource.com.jolbox.bonecp.class= com.jolbox.bonecp.BoneCPDatasourceProxy
batoo.datasource.com.jolbox.bonecp.statementsCacheSize= 50
batoo.datasource.com.jolbox.bonecp.releaseHelperThreads= 0
(...)

[perf] Avoid for each loops on ArrayList [2]

I will provide a patch tomorrow.

If you have a idea how to optimize

  • ManagedList line 192

and replace the iterator loop with a index based loop in

  • PluralAssociationMapping line 573

we only have aroud 15k iterator instances anymore.

900k vs 15k should be a great performance boost.

@Id @ManyToOne attribute will be handled as basic attribute

A attribute with @id and @manytoone will be handled as BASIC attribute in 0.1.3:

@Id
@ManyToOne
@NotNull
@JoinColumn(name = "entity2Id", nullable = false)
private Entity2 entity2;

ParentMapping#createMapping reads the attribute#getPersistentAttributeType() and this returns PersistentAttributeType#BASIC for this attribute.

ManagedList is not serializable

ManagedList is not serializable and therefore serialization fails if you store entities in ViewScoped/SessionScoped beans.

Constant expression is not handled properly

Test Case created.

public class SimpleCriteriaTest extends BaseCoreTest {

    (..)

    /**
     * 
     * @since $version
     * @author hceylan
     */
    @Test
    public void testSimple3() {
        final Person person = this.person();

        this.persist(person);
        this.persist(this.person());

        this.close();

        final CriteriaBuilderImpl criteriaBuilder = this.em().getCriteriaBuilder();
        final CriteriaQueryImpl<Address> criteriaQuery = criteriaBuilder.createQuery(Address.class);
        final RootImpl<Address> from = criteriaQuery.from(Address.class);
        final List<PredicateImpl> predicates = new ArrayList<PredicateImpl>();
        predicates.add(criteriaBuilder.equal(from.get("person"), person));
        criteriaQuery.select(from);
        if (!predicates.isEmpty()) {
            criteriaQuery.where(criteriaBuilder.and(predicates.toArray(new Predicate[predicates.size()])));
        }
        final TypedQuery<Address> query = this.em().createQuery(criteriaQuery);

        query.getResultList();
    }
}
-----------------------------------------------------------------------------------------------------------------------------------
| SELECT                                                                                                                          |
|     E0_P.id AS E0_P_F0, E0_P.person_id AS E0_P_F1, E0_P.primary_ AS E0_P_F2, E0_P.country_code AS E0_P_F3, E0_P.city AS E0_P_F4 |
| FROM Address E0_P                                                                                                               |
|     LEFT JOIN Person E1_P ON E0_P.person_id = E1_P.id                                                                           |
| WHERE                                                                                                                           |
|     (E1_P.id = 'org.batoo.jpa.core.test.q.Person@e9c51bb')                                                                      |
-----------------------------------------------------------------------------------------------------------------------------------

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.