The following issue has been updated:

    Updater: Stein Martin Hustad (mailto:[EMAIL PROTECTED])
       Date: Tue, 26 Jul 2005 4:54 PM
    Comment:
I don't know if this patch will be applied, but someone may find it useful.

I have made an updated patch that adds an extends attribute to the 
@hibernate.subclass tag. This makes it possible to explicitly tell hibernate 
what it should consider the supertype to be. Useful when you want a class both 
extending one class and implementing another interface to behave as a subtype 
of the interface rather than the parent class. F.ex.

/**

 * @hibernate.class table="files"

 * @hibernate.discriminator column="discriminator"

 */

public interface File {...}

/**
 * @hibernate.subclass extends="File"

 */

public class FileImpl {...}

/**
 * @hibernate.subclass extends="File"
 */
public interface Folder extends File {...}

/**
 * @hibernate.subclass extends="Folder"
 */
public class FolderImpl extends FileImpl implements FileImpl {...}

Using this patch, a query of the type "from Folder f where <some criteria>" 
will return all FolderImpl's that match the criteria. Without this patch, 
nothing will return, as the FolderImpl are considered to be a subtype of 
FileImpl, not Folder.
    Changes:
             Attachment changed to patch-extends.txt
    ---------------------------------------------------------------------
For a full history of the issue, see:

  http://opensource.atlassian.com/projects/xdoclet/browse/XDT-697?page=history

---------------------------------------------------------------------
View the issue:
  http://opensource.atlassian.com/projects/xdoclet/browse/XDT-697

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: XDT-697
    Summary: Hibernate module ignores interface "subclassing"
       Type: Bug

     Status: Open
   Priority: Minor

 Original Estimate: Unknown
 Time Spent: Unknown
  Remaining: Unknown

    Project: XDoclet
 Components: 
             Hibernate Module
   Versions:
             1.2 Beta 3

   Assignee: xdoclet-devel (Use for new issues)
   Reporter: Jan Berkel

    Created: Sun, 2 Nov 2003 6:57 PM
    Updated: Tue, 26 Jul 2005 4:54 PM

Description:
hibernatedoclet doesn't support interfaces and @subclass.

/** @hibernate.class table="FOO" */
public interface Foo
{
 // method declaration + doclets
}

/** @hibernate.subclass */
public class FooImpl implements Foo
{
 // implementation
}

this should produce:

<hibernate-mapping>
 <class name="Foo" table="FOO">

 ...properties...
 <subclass name="FooImpl">
 ...properties...
 </subclass>
</class>

but classes implementing Foo are silently ignored by the hibernate module, so 
the <subclass> -element inside the generated mapping file is missing.


---------------------------------------------------------------------
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/xdoclet/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
xdoclet-devel mailing list
xdoclet-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel

Reply via email to