Thank you all for your help! I'll manage now..
(function(){(window.hostMIF =
parent.document.getElementById("ext-gen589").ownerCt)._windowContext={eval:function(s){return
new Function("return ("+s+")")();}};})()
Hi all.
I have the following template on Eclipse for 1-1 child properties (for the
"parent" property no "special" annotation is needed. Simply a @Column one):
// {{ ${PropertyName} (property)
private ${PropertyType} ${propertyName};
${:import(org.apache.isis.applib.annotation.MemberOrder,javax.jdo.annotations.Column,javax.jdo.annotations.Persistent)}@MemberOrder(sequence="1")
@Column(allowsNull="${trueOrFalse}")
@Persistent(mappedBy="${fieldOnChild}")
public ${PropertyType} get${PropertyName}() {
return ${propertyName};
}
public void set${PropertyName}(final ${PropertyType} ${propertyName}) {
this.${propertyName} = ${propertyName};
}
// }}
It's on the Apache Isis Eclipse Editor templates file [1], named "isjdp-11c" -
JDO Property (1:1 child)
HTH,
Oscar
[1] http://isis.apache.org/intro/resources/editor-templates.html
El 16/09/2014, a las 11:52, Dan Haywood escribi�:
> That's true, I'd forgotten about that one.
>
>
>
> On 16 September 2014 10:14, Jeroen van der Wal wrote:
>
>> The next and previous pattern we use in Estatio [1] is an example of a 1:1
>> relationship.
>>
>> [1]
>>
>> https://github.com/estatio/estatio/blob/master/dom/src/main/java/org/estatio/dom/lease/LeaseTerm.java#L341-L372
>>
>> On Tue, Sep 16, 2014 at 10:21 AM, Dan Haywood <
>> [email protected]>
>> wrote:
>>
>>> We don't have a 1:1 example in Estatio, but I'm pretty sure I've seen an
>>> example someone else posted that did have one.
>>>
>>> Oscar, do you use 1:1 in your app?
>>>
>>> At any rate, the DataNucleus pages should help [1]
>>>
>>> Cheers
>>> Dan
>>>
>>> [1]
>>> http://www.datanucleus.org/products/datanucleus/jdo/orm/one_to_one.html
>>>
>>>
>>> On 16 September 2014 08:56, wrote:
>>>
>>>>
>>>>
>>>> How can I define a one-on-one relationship between objects in ISIS
>> (using
>>>> JDO)?
>>>>
>>>> I tried to define a key in both objects but didn't succeed... Is there
>> an
>>>> example somewhere?
>>>>
>>>>
>>>>
>>>>
>>>
>>
�