Can't make IRC meeting this week
by Steve Ebersole
I will not be able to make the IRC meeting this week. Up to y'all if
you want to have one still. If so, please use jbott to capture the logs.
Thanks
11 years, 8 months
JIRA notification schemas
by Sanne Grinovero
Since any JIRA change will trigger an email to
hibernate-issues(a)lists.jboss.org, and JIRA can't possibly know who is
on this list, I'm getting many duplicates.
I like the fine-grained level on the mailing list as it's a safe
backup & log to inspect all events, still the volume is forcing me to
filter those emails in my client; filtering made me miss some events
that I'm particularly interested in, so:
I've created a new notification scheme - forking the original one so
that it doesn't affect other projects - and will apply it to Hibernate
Search for now.
What is changed:
- some more events are specifically sent to the Project Lead (in
addition to "participants"): Assigned, Closed, Deleted, Moved, Work
Started and Stopped.
- some more events are sent to those part of the "committers" group:
Created, Resolved, Pull request sent.
If you're interested in comments or other fine-grained events related
to an issue, either keep using the hibernate-issues mail folder or
make sure to "Watch" the issue when it's created.
I'm only applying this to HSEARCH for now, I guess most of you won't
notice significant differences.
@Hardy I see there is a one-off specific rule to send you an
individual email for any issue creation, I removed that as it
shouldn't be needed anymore?
If some of this doesn't work for you, let me know I'll try fixing it.
Cheers,
Sanne
11 years, 8 months
i18n and cascade validation
by Mihai Cazacu
Hi,
I have this classes:
class Address {
>
@NotEmpty(message = "{address.notEmpy}")
String body
> }
class Contact {
> Address address
> }
class Person {
> Contact contact
> Address address
> }
Is there a way to obtain different messages when the "address.body" is null
in both Person and Contact?
Right now I've got:
ConstraintViolationImpl{interpolatedMessage='may not be empty',
> propertyPath=contact.address.body, rootBeanClass=class Person,
> messageTemplate='{address.notEmpy}'}
> ConstraintViolationImpl{interpolatedMessage='may not be empty',
> propertyPath=address.body, rootBeanClass=class Person,
> messageTemplate='{address.notEmpy}'}
Thanks!
Mihai
11 years, 8 months
initial attempt at Enterprise OSGi JPA support -- complete
by Brett Meyer
I was finally able to get a simple example working on Apache Karaf using container-managed Enterprise OSGi JPA.
Pull request:
https://github.com/hibernate/hibernate-orm/pull/465/files
I would really appreciate it if some of you could grab the following fork and try it out in your own environments – feedback is definitely needed:
https://github.com/brmeyer/hibernate-orm/tree/4.2-osgi
A simple test client bundle is available as a reference. Something like this will eventually wind up in the doc examples. Instructions are in the README (rough draft).
https://github.com/brmeyer/HibernateOSGi
There's a few caveats to ORM at this point:
1.) I have not yet tested a bundle creating and maintaining it's own EntityManagerFactory or SessionFactory. Only container-managed has been used so far.
2.) Only basic support for persistence units is available. We have not handled the use of OSGi services to register Integrators, etc.
3.) IMPORTANT: We can currently handle only annotated classes explicitly listed in your persistence unit. There's a few roadblocks preventing us from scanning for mapping files, classes, etc.
4.) The provided feature.xml files are fairly order-specific. Comments within them (and the proposal wiki) outline the issue.
The proposal wiki is updated with more info and questions:
https://github.com/hibernate/hibernate-orm/wiki/Proposal:-OSGi
We're not comfortable releasing this until the community is able to help confirm the fork. Any help is sincerely appreciated!
Brett Meyer
Red Hat Software Engineer, Hibernate
+1 260.349.5732
11 years, 8 months
Extending hibernate
by Sebastian
Hello,
My name is Sebastián Marichal, im Computer Engineer and im from Uruguay.
Actually im working in a great bearing system, using JavaEE and
Hibernate as ORM.
We implemented an audit mechanism using triggers in order to know each
insertion and deletion from the database. Everything is working very
well, but we noticed that in many-to-many associations , when adding an
element to a collection, hibernate deletes de full collection and
inserts each element again. For example:
1 - We have A with a collection of B elements: A ---> [B1,B2,B3]
2 - Add another B elemento to the collection: A.addB(B4)
3 - Hibernate delete all the rows from the mapping table A_B and then
inserts all the B elements again. Something like this:
A.removeAll(B1,B2,B3)
A.insert(B1)
A.insert(B2)
A.insert(B3)
A.insert(B4)
We noticed this because the log of the audit mechanism was very dirty,
where we expected to see "B4 inserted into A_B table" we acctually see
"B1 deleted from A_B table"
"B2 deleted from A_B table"
"B3 deleted from A_B table"
"B1 inserted into A_B table"
"B2 inserted into A_B table"
"B3 inserted into A_B table"
"B4 inserted into A_B table"
We needed to avoid this kind of dirty log, so we decided to implement
native query for many to many collection manipulation, but this fix
isn't good enough because the version number (we are using optimistic
locking) of the entity isn't being updated automatically.
Is there any way to change de add and remove implementation of hibernate
for many-to-many associations? Maybe extending hibernate? I know that
there si an extension api but im not sure if it can be used for this
purpose.
I would like your opinion and suggestions!
Thanks you!!
Sebastián Marichal
11 years, 8 months
JIRA disk space problem
by Guillaume Smet
Hi,
You're probably already aware of it but just in case...
I can't login to Hibernate JIRA. It looks like the server is out of disk space:
com.atlassian.crowd.embedded.ofbiz.db.DataAccessException:
org.ofbiz.core.entity.GenericEntityException: while inserting:
[GenericEntity:UserAttribute][lowerValue,1359973946698][id,632922][name,lastAuthenticated][userId,27141][directoryId,1][value,1359973946698]
(SQL Exception while executing the following:INSERT INTO
public.cwd_user_attributes (ID, user_id, directory_id, attribute_name,
attribute_value, lower_attribute_value) VALUES (?, ?, ?, ?, ?, ?)
(ERROR: could not extend relation 1663/25290/26840: No space left on
device Hint: Check free disk space.))
--
Guillaume
11 years, 8 months