The first problem is not the annotation, it's the method signature.  I need
to call add_method_signature for a method whose return type is a class that
has not yet been reified.

--Chris

On Tue, Nov 24, 2009 at 4:15 PM, Nick Sieger <[email protected]> wrote:

> On Tue, Nov 24, 2009 at 10:37 AM, Chris Nelson
> <[email protected]> wrote:
> > Charles, Tom, et all,
> >
> > Was discussing this in IRC just now and thought I'd ask it here too.  I'm
> > about to start in on adding relationship support to jruby-hibernate and
> ran
> > into the following conundrum.  Let's say I have 2 classes, Event and Log,
> > and Event has a many-to-one bi-directional relationship with Log.  In
> order
> > to model this from Hibernate perspective, Event needs a Log property
> > annotated with @ManyToOne and and Log needs a collection of Events
> annotated
> > with a @OneToMany annotation that has a targetEntity of the Event java
> > class.  The problem seems to be that both will need the java class of the
> > other, so whichever one I call become_java! on first won't work.  This
> seems
> > to be a problem, but I haven't written any code yet to verify it.  Can
> > anyone shed any light on whether this is going to work?
>
> The actual annotations don't need a reference to a class, but perhaps
> we need to open up a way to refer to a class in an annotation even
> though the actual class is not defined yet. Ideas on how we could do
> that? Maybe a way to pre-tag a Ruby class with its fully-qualified
> java class name and pass a Ruby class in? We could then use that name
> when reifying the class, so that we don't have to dump everything in
> the "ruby.*" package.
>
> /Nick
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
>

Reply via email to