|
From: <leg...@at...> - 2003-08-10 11:38:14
|
Message:
The following issue has been closed.
Resolver: Max Rydahl Andersen
Date: Sun, 10 Aug 2003 6:37 AM
This is intentional to have the <meta> tag uniformily be inherited by nested tags.
To avoid having the implements tag "inherit" further down you just add an attribute inherit="false" on it - then it will not be inherited down to composite id's.
I know the default inheritance of meta sometimes causes "funny" effects - but we have made the inheritance "rule" as simple as possible (namely: "ALWAYS inherit meta, except if inherit=false") thus you get the easy feature of just saying: <meta attribute="scope-field">protected</meta> just ONCE in the hbm.xml.
But if you got more "complex" hbm.xml files then you'll have to be more explicit about it.....hope ya' understand ;)
/max
---------------------------------------------------------------------
View the issue:
http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-242
Here is an overview of the issue:
---------------------------------------------------------------------
Key: HB-242
Summary: <meta attribute="implements"> does not behave as expected
Type: Bug
Status: Closed
Priority: Major
Resolution: REJECTED
Project: Hibernate2
Components:
toolset
Versions:
2.0.1
Assignee:
Reporter: abe zafar
Created: Sun, 10 Aug 2003 2:40 AM
Updated: Sun, 10 Aug 2003 6:37 AM
Environment: JDK1.4
Description:
If the tag <meta attribute="implements">com.hp.Printer</meta> is inserted as a child of the class tag it properly adds the implement clause to the class. But if that class also contained a <composite-id> tag which indicated a class then that class would also UNEXPECTEDLY implement the interface "com.hp.Printer".
So in the following example:
<class name="com.hp.ColorPrinter">
<meta attribute="implements">com.hp.Printer</meta>
<composite-id
name="propertyName"
class="com.hp.PrinterId">
<key-property name="propertyName" type="typename" column="column_name"/>
<key-many-to-one name="propertyName class="ClassName" column="column_name"/>
</composite-id>
Both "ColorPrinter" and "PrinterId" end up implementing "com.hp.Printer". ColorPrinter is expected to implement the interface, but PrinterId should not implement the interface.
---------------------------------------------------------------------
JIRA INFORMATION:
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.jspa
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
|