generic ref from trans to trans object

3 views
Skip to first unread message

Simon Oberhammer

unread,
Apr 24, 2009, 6:37:53 AM4/24/09
to Helma
hi group :)
the subject says it all. when I try to set a generic-reference-field
of a transient object to another transient object, I get this error
msg:

{{{
get:/ helma.scripting.ScriptingException: Wrapped
java.lang.RuntimeException: Object is transient, can't derive
persistent ID for Relation [dgf.Tag].target_id -> tag_f_target_id
}}}

the message makes it sound intentional, though I don't understand why
this doesn't.

Minimal test case with demo app [1] would be:

{{{
var image = new Image();
var tag = new Tag();
image.tags.add(tag); // error...
}}}

we're using more and more generic refs - so at least understanding why
this doesn't / can't work would be helpful.

bye
simon


[1] http://dev.helma.org/bugs/show_bug.cgi?id=516

Hannes Wallnoefer

unread,
Apr 24, 2009, 7:34:12 AM4/24/09
to he...@googlegroups.com
Hi Simon,

2009/4/24 Simon Oberhammer <simon.ob...@gmail.com>:
>
> hi group :)
> the subject says it all. when I try to set a generic-reference-field
> of a transient object to another transient object, I get this error
> msg:
>
> {{{
> get:/ helma.scripting.ScriptingException: Wrapped
> java.lang.RuntimeException: Object is transient, can't derive
> persistent ID for Relation [dgf.Tag].target_id -> tag_f_target_id
> }}}
>
> the message makes it sound intentional, though I don't understand why
> this doesn't.

I guess the message means "I haven't bothered to implement this yet".
I'll have a look at it. Maybe it's enought to just bypass the whole
generic reference code for transient objects.

Hannes

Hannes Wallnoefer

unread,
Apr 28, 2009, 9:31:12 AM4/28/09
to Helma
Hi Simon,

I think this should work now in Svn trunk. Please let me know if it
doesn't, and thanks for reporting it.

Hannes

On Apr 24, 12:37 pm, Simon Oberhammer <simon.oberham...@gmail.com>
wrote:

Simon Oberhammer

unread,
Apr 28, 2009, 9:50:28 AM4/28/09
to Helma
Hi Hannes,
still same error. i tried with the demo app, this is the trace:
http://helma.pastebin.com/m6208e940

thanks for looking into this

simon
Reply all
Reply to author
Forward
0 new messages