Fwd: Link to test case templates
by Sanne Grinovero
Adding back the list.
To answer Martijn: personally I don't know the answer, but it sounds
like an excellent idea to implement that, if it's not possible
already.
Keep in mind that Hibernate might need to generate multiple SQL
statements per operation.
Sanne
---------- Forwarded message ----------
From: Martijn Dashorst <martijn.dashorst(a)gmail.com>
Date: 31 October 2015 at 05:43
Subject: Re: [hibernate-dev] Link to test case templates
To: Sanne Grinovero <sanne(a)hibernate.org>
Good to see making test cases easier.
Is it possible to test the actual SQL that is emitted by Hibernate
from a test case? I've looked at the github repo but didn't find a
matching method.
Martijn
On Friday, 30 October 2015, Sanne Grinovero <sanne(a)hibernate.org> wrote:
>
> We should add a page on hibernate.org describing the idea, and from
> there point to github.
>
> On 30 October 2015 at 07:49, Steve Ebersole <steve(a)hibernate.org> wrote:
> > But that was not the purpose of the content at the old link. Yes the
> > templates are nice but that's not the whole picture of what makes a good
> > test case
> >
> > On Fri, Oct 30, 2015, 9:41 AM Gunnar Morling <gunnar(a)hibernate.org> wrote:
> >
> >> 2015-10-30 15:16 GMT+01:00 Steve Ebersole <steve(a)hibernate.org>:
> >> > It looks like that may just be an invalid URL.
> >>
> >> Yes, the link should point to
> >> https://github.com/hibernate/hibernate-test-case-templates instead.
> >> There are the test case templates and also a description of their
> >> usage.
> >>
> >>
> >> > It looks like the content
> >> > that was at that URL was not migrated over in the website migration.
> >> >
> >> > This ties in with an uneasiness that has been growing on me tbh... We
> >> have
> >> > too many places users have to look for potential information. The
> >> website,
> >> > the JBoss wiki, the GitHub wiki, README.mds, CONTRIBUTING.mds. It's
> >> hard to
> >> > keep straight :)
> >> >
> >> > Ideally a lot of this would live under hibernate.org website umbrella.
> >> But
> >> > to be frank, I find developing content for hibernate.org and
> >> in.relation.to
> >> > to be cumbersome. We can get into "why" in a separate subject.
> >> >
> >> >
> >> >
> >> > On Fri, Oct 30, 2015 at 8:53 AM Steve Ebersole <steve(a)hibernate.org>
> >> wrote:
> >> >>
> >> >> But for some reason it directs me back to JIra. Even just clicking that
> >> >> link in the email does. I wonder if someone set up a bad redirect on
> >> the
> >> >> hibernate.org website for that?
> >> >>
> >> >> On Fri, Oct 30, 2015 at 8:52 AM Steve Ebersole <steve(a)hibernate.org>
> >> >> wrote:
> >> >>>
> >> >>> The link target is
> >> http://www.hibernate.org/issuetracker.html#testcases.
> >> >>> That's not the "JIRA main page".
> >> >>>
> >> >>>
> >> >>> On Fri, Oct 30, 2015 at 8:44 AM Gunnar Morling <gunnar(a)hibernate.org>
> >> >>> wrote:
> >> >>>>
> >> >>>> Hi,
> >> >>>>
> >> >>>> When creating a new HHH issue, there is a link "...should generally be
> >> >>>> accompanied by a test case" but it directs to the JIRA main page.
> >> >>>>
> >> >>>> Can we let it point to the test case template repo instead:
> >> >>>>
> >> >>>> https://github.com/hibernate/hibernate-test-case-templates
> >> >>>>
> >> >>>> Thanks,
> >> >>>>
> >> >>>> --Gunnar
> >> >>>> _______________________________________________
> >> >>>> hibernate-dev mailing list
> >> >>>> hibernate-dev(a)lists.jboss.org
> >> >>>> https://lists.jboss.org/mailman/listinfo/hibernate-dev
> >>
> > _______________________________________________
> > hibernate-dev mailing list
> > hibernate-dev(a)lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/hibernate-dev
> _______________________________________________
> hibernate-dev mailing list
> hibernate-dev(a)lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hibernate-dev
--
Become a Wicket expert, learn from the best: http://wicketinaction.com
10 years, 1 month
Triage meeting
by andrea boriero
sorry but I cannot attend the today triage meeting
10 years, 1 month
SQM : Criteria translation design
by Steve Ebersole
I started work on SQM-24 which covers translation of criteria queries into
SQM.
The difficulty with this is that the JPA contracts alone do not give enough
information to really be able to understand the semantics of the query;
there is just not enough information exposed. I can get into specific
examples if that helps, but for now lets take that as a given...
So then how do we go about translating a criteria into an SQM? There are
going to be 2 main approaches. Each requires some level of extension to
the standard contracts:
The first approach is to use visitation. The criteria nodes would be
expected to implement an SQM extension accepting a visitor and do the right
thing. The gains here are the normal gains with the visitor pattern. The
downside is that this makes SQM highly dependent on the criteria impl doing
the right thing and makes the criteria impl sensitive to SQM (depending n
how we expose the visitation methods to a degree).
The second approach would be to extended the standard criteria contracts to
more fully cover the semantic. As one example, JPA defines just Predicate
(for the most part) without exposing the type of predicate. Is it a LIKE
expression? A BETWEEN? A Comparison (=, !=, <, etc)? We just don't know
from the standard contracts. So we'd have to develop a full semantic
extension model here. `interface LikePredicate extends Predicate`,
`BetweenPredicate extends Predicate`, etc.
I lean towards the visitor approach given these choices. Anyone else have
opinions? Other options?
10 years, 1 month
Hibernate5 migration
by Koen Serneels
Hi,
I'm migrating from Hibernate4 to 5(RC4). While doing so I'm stumbling on
some stuff that has been removed or moved.
- In Hibernate4 we modified mappings on-the-fly by overriding Spring's
LocalSessionFactoryBean#buildSessionFactory.
Doing so we could first access the getClassMapping on
org.hibernate.cfg.Configuration before letting the SF actually build.
However, in Hibernate5 the metadata access has been refactored and is no
longer part of the Configuration. Should we use MetadataContributor instead
for these purposes?
- Is there a way to register MetadataContributor dynamically? I see that it
is being loaded using Java's ServiceLoader.
However, I need some programmatic API access to enable or disable the
Contributor (for example based on Spring profiles).
- For JTA integration we were using
org.hibernate.engine.transaction.internal.jta.CMTTransactionFactory, but
this class is no longer present.
Also in org.hibernate.cfg.AvailableSettings the key that was used
(hibernate.transaction.factory_class) to configure the factory is also
removed.
Is hibernate.transaction.coordinator_class the new key we should be using
instead with
org.hibernate.resource.transaction.backend.jta.internal.JtaTransactionCoordi
natorImpl as value for JTA?
Do we need to configure anything special in case of resource local TX or is
JdbcResourceLocalTransactionCoordinatorImpl the default?
- generateDropSchemaScript and generateSchemaCreationScript have been
removed from Configuration. Is there a way to access this in another way?
Thanks
Koen.
10 years, 1 month