streamx-co / fluentjpa Goto Github PK
View Code? Open in Web Editor NEWFluent API for writing typesafe SQL queries in Java for JPA.
Home Page: https://fluentjpa.com
License: Other
Fluent API for writing typesafe SQL queries in Java for JPA.
Home Page: https://fluentjpa.com
License: Other
I am using Java 11 to write a desktop application that uses hibernation as JPA provider.
When I try to compile the code I get this error:
Modules jpa.notations and fluent.jpa export package co.streamx.fluent.JPA.spi to module java.persistence
my `module-info.java' file:
module org.sarc.ekrima.geany {
requires javafx.fxml;
requires javafx.controls;
requires simplefx;
requires java.persistence;
requires com.h2database;
requires java.sql;
requires org.hibernate.orm.core;
requires jpa.notations;
requires fluent.jpa;
requires sql.grammar;
requires jdk.xml.dom;
requires javafx.swing;
requires io.nayuki.qrcodegen;
requires io.github.classgraph;
exports org.sarc.ekrima.geany.ui to simplefx;
opens org.sarc.ekrima.geany.ui to javafx.fxml;
exports org.sarc.ekrima.geany.backend.entities to org.hibernate.orm.core;
exports org.sarc.ekrima.geany;
}
The error is caused by 2 lines:
requires jpa.notations;
requires fluent.jpa;
I don't want to write FROM and SELECT every time. Can we packaging FluentJPA.SQL again. Only pass the WHERE condition and return a complete SQL statement
For example, if you are running FluentJPA on your server, to provide a SaaS services, you would have to give away all of your source code.
I think this does not hold, since your specific software is not meant to be used by a user over a network. Pls. double check. Also read the page you refer to:
https://www.gnu.org/licenses/why-affero-gpl.html
Which links to:
https://www.gnu.org/philosophy/who-does-that-server-really-serve.html
itext is an interesting example of an APGL library, where the AGPL approach for dual licensing seems to work. Maybe their approach works out since the (end) user gets the PDF and generating PDFs is an explicit function of the including software. So there is user interaction for the purpose of generating the PDF.
I recommend to release the basic product simply under Apache and make money with addons, support and training. Even GPL is too restrictive and hinders adoption.
Sorry to bring this up as first issue. But I wouldn't make the effort, if I didn't see any potential here ;)
Provide support for the second case described in https://thoughts-on-java.org/hibernate-tip-difference-between-joincolumn-and-primarykeyjoincolumn/
Can I just copy paste and use it in company
I'm trying to implement a query with generic type in a base repository.
public List<T> getByName(String name) {
FluentQuery query = FluentJPA.SQL((T animal) -> {
SELECT(animal);
FROM(animal);
});
Stream<?> stream = query.createQuery(getEntityManager()).getResultStream();
return stream.map(x -> (T) x)
.collect(Collectors.toList());
}
But instead of the concrete @entity type the @MappedSuperclass is used.
org.springframework.dao.InvalidDataAccessApiUsageException: Cannot calculate table reference from: class com.github.tomschi.fluentjpa.genericissue.AbstractAnimal; nested exception is java.lang.IllegalStateException: Cannot calculate table reference from: class com.github.tomschi.fluentjpa.genericissue.AbstractAnimal
Full example: https://github.com/Tomschi/fluentjpa-issues
Is this an issue?
After going through the FluentJPA Implementation on DZone. I was able to import all the statements like FluentJPA, FluentSQL, But I was unable to import subQuery into my program we have installed only fluent-jpa
So we need to import another maven package to access subQuery method??
How to resolve this issue??
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.