danjee / generic-data Goto Github PK
View Code? Open in Web Editor NEWGeneric Hibernate DAO methods
Generic Hibernate DAO methods
In my project I have two entities ;
InvoiceEntity( id , groupcode, company, currencytype)
CompanyEntity(id, name,code,workfield);
I generate QP as follows;
QueryParameter qp=new QueryParameter();
qp.addRestriction(new ValueRestriction("groupcode", EQ, groupcode));
qp.addRestriction(new ValueRestriction("company.code", EQ, code));
List list= service.getList(InvoiceEntity.class,qp.addLazyFieldToInitialize("currencytype").addLazyFieldToInitialize("company"));
When run the code ;
I get this error. How Can I implement "Alias" with project
org.hibernate.QueryException: could not resolve property: company.code of: edu.anatolia.InvoiceEntity
Thanks for all
请问支持分页吗?
It says that we can use from Maven central
<dependency> <groupId>ro.fortsoft</groupId> <artifactId>generic-data</artifactId> <version>1.9.0</version> </dependency>
but when I do so,the jar can't be downloaded to my project. I change "generic-data" to "generic-data-service",and then it works.
something wrong with me? or something wrong with the readme file?
Unit tests should be added to increase coverage
Add the IEQ for ignoring case
Dear developers,
Any help or sample code demo for generic-data project ?
If you have could you send ?
Thanks for all
Dear developers,
I am using your framework which is very flexible and make me faster. Thanks for it;
But I couldnt implement ValueRestriction list . While calling getList method I get "The method getList(Class, QueryParameter, T) in the type GenericService is not applicable for the arguments (Class, String, List)" error
@Autowired
private GenericService service;
public List<News> findAllByFirma(Firma firma, Sube sube) {
List<ValueRestriction> restrictions = new ArrayList<>();
if(firma!=null)
restrictions.add(new ValueRestriction("firma", QueryParameter.EQ, firma));
if(sube!=null)
restrictions.add(new ValueRestriction("sube", QueryParameter.EQ, sube));
return service.getList(News.class, QueryParameter.OR_RESTRICTIONS, restrictions);
}
Where am I wrong?
Dear Danjee,
I am wondering how can I implement latest N record with generic_service;
For example I have User class and it related with the company entity. I want to get latest N User as a List
Select * from Users where company_id=10 order by id desc Limit 10;
Thanks
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.