[Hibernate-JIRA] Commented: (HHH-756) schema export tool does not check for apostrophe within the <comment></comment> tags
by Chris Wilson (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-756?page=co... ]
Chris Wilson commented on HHH-756:
----------------------------------
I do consider this a bug as well. I'm being given hbm mapping files with quotes in them. Hibernate doesn't do anything at all to escape characters in these fields. From org.hibernate.mapping.Table sqlCommentStrings():
StringBuffer buf = new StringBuffer()
.append( "comment on table " )
.append( tableName )
.append( " is '" )
.append( comment )
.append( "'" );
comments.add( buf.toString() );
It is useful to have apostrophe/single quote and also double quote characters within <comment> elements, and I would like Hibernate to support that:
<many-to-one name="country" class="org.wfp.rita.dao.Country" fetch="select">
<column name="cntcctryid">
<comment>Contact's address country</comment>
</column>
</many-to-one>
"Doctor, it hurts if I do this..." is not always a good excuse. E.g. if you say "Doctor, it hurts when I breathe", the correct answer is not "well, don't do that". If the use case is valid and useful then it should not be excused away IMHO.
Please reopen this bug.
> schema export tool does not check for apostrophe within the <comment></comment> tags
> -------------------------------------------------------------------------------------
>
> Key: HHH-756
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-756
> Project: Hibernate Core
> Issue Type: Bug
> Components: core
> Affects Versions: 3.0.5
> Reporter: Craig Baker
> Priority: Trivial
>
> If an apostrophe appears within <comment> </comment> tag, schema export tool fails to create valid DDL syntax.
> eg.
> <hibernate-mapping>
> ..
> <comment>The user's session</user>
> ..
> </hibernate-mapping>
> produces
> create table (
> ..
> ) comment = 'The user's session';
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 2 months
[Hibernate-JIRA] Created: (HHH-4515) PersistentMap.readFrom does not read records which have NULL in the element
by Rammohan Yadavalli (JIRA)
PersistentMap.readFrom does not read records which have NULL in the element
---------------------------------------------------------------------------
Key: HHH-4515
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4515
Project: Hibernate Core
Issue Type: Bug
Affects Versions: 3.2.3
Reporter: Rammohan Yadavalli
Priority: Blocker
Hi,
I noticed that PersistentMap.readFrom / PersistentSet.readFrom does not add the element to the Map/Set if the element is NULL. This is causing an issue where I have rows in the database against and a row can contain a NULL value against a PK.
Can you please let me know what is the reasoning behind this particular behavior, or at least let me know if it is okay to extend the PeristentMap, overload the readFrom method and modify it to remove the null check on the element?
Instead of if ( element!=null ) map.put(index, element); just do a map.put(index, element)?
I am running into a production issue and I appreciate a positive response instead of "won't fix".
Please advise.
Thanks,
Ram
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 2 months
[Hibernate-JIRA] Commented: (HHH-1582) PostInsertListener + "post-commit-insert"
by Holger Wagner (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1582?page=c... ]
Holger Wagner commented on HHH-1582:
------------------------------------
In some way we have different understanding of 'fixed'? I thought, it means that the problem is corrected.
> PostInsertListener + "post-commit-insert"
> -----------------------------------------
>
> Key: HHH-1582
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1582
> Project: Hibernate Core
> Issue Type: Bug
> Affects Versions: 3.1.2
> Reporter: Daniel Gredler
> Assignee: Emmanuel Bernard
> Original Estimate: 3 hours
> Remaining Estimate: 3 hours
>
> I'm using a custom PostInsertEventListener mapped to the "post-commit-insert" event to process domain objects. However, PostInsertEventListener's onPostInsert(PostInsertEvent) is getting called even when the insert was not successful (ie, due to a unique constraint in the database or some such). It looks to me like Hibernate should either a) not invoke the event listener if the insert failed or b) provide state (perhaps in the form of a boolean indicating success/failure). Personally I'd rather the method not be called on failure, but there may be use cases out there for the second option.
> As an example, it looks like Hibernate's own LuceneEventListener will add a domain object to the index in onPostInsert(PostInsertEvent) even if the insert failed.
> Note that this problem also seems to exist in EntityDeleteAction and EntityUpdateAction (which would mean that Hibernate's LuceneEventListener removes domain objects from the Lucene index even if the delete fails!).
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 2 months
[Hibernate-JIRA] Commented: (HHH-1582) PostInsertListener + "post-commit-insert"
by Emmanuel Bernard (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1582?page=c... ]
Emmanuel Bernard commented on HHH-1582:
---------------------------------------
@Holger
AS I already said in this thread, use a transaction Synchronization object instead, you will get proper status propagation.
> PostInsertListener + "post-commit-insert"
> -----------------------------------------
>
> Key: HHH-1582
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1582
> Project: Hibernate Core
> Issue Type: Bug
> Affects Versions: 3.1.2
> Reporter: Daniel Gredler
> Assignee: Emmanuel Bernard
> Original Estimate: 3 hours
> Remaining Estimate: 3 hours
>
> I'm using a custom PostInsertEventListener mapped to the "post-commit-insert" event to process domain objects. However, PostInsertEventListener's onPostInsert(PostInsertEvent) is getting called even when the insert was not successful (ie, due to a unique constraint in the database or some such). It looks to me like Hibernate should either a) not invoke the event listener if the insert failed or b) provide state (perhaps in the form of a boolean indicating success/failure). Personally I'd rather the method not be called on failure, but there may be use cases out there for the second option.
> As an example, it looks like Hibernate's own LuceneEventListener will add a domain object to the index in onPostInsert(PostInsertEvent) even if the insert failed.
> Note that this problem also seems to exist in EntityDeleteAction and EntityUpdateAction (which would mean that Hibernate's LuceneEventListener removes domain objects from the Lucene index even if the delete fails!).
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 2 months