You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by kk4Nabble <ka...@gmail.com> on 2009/04/21 13:20:02 UTC

relationship between the entities (database tables) in tapestry 5

Hi all,	

If we wanted to have one to one relationship to other entity, in  tapestry 4
we used to do in following way.

@OneToOne(cascade = CascadeType.REFRESH, fetch = FetchType.LAZY)
	@JoinColumn(name = "detail_oid")
	public Detail getDetail() {
		return Detail;
	}

	public void setDetail(Detail Detail) {
		this.Detail = Detail;
	}

Is it the same way in tapestry 5?

Thanks
-- 
View this message in context: http://www.nabble.com/relationship-between-the-entities-%28database--tables%29-in-tapestry-5-tp23153944p23153944.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: relationship between the entities (database tables) in tapestry 5

Posted by Ulrich Stärk <ul...@spielviel.de>.
This has nothing to do with Tapestry, it's a matter of your 
object/relational mapper.

Uli

Am 21.04.2009 13:20 schrieb kk4Nabble:
> Hi all,	
> 
> If we wanted to have one to one relationship to other entity, in  tapestry 4
> we used to do in following way.
> 
> @OneToOne(cascade = CascadeType.REFRESH, fetch = FetchType.LAZY)
> 	@JoinColumn(name = "detail_oid")
> 	public Detail getDetail() {
> 		return Detail;
> 	}
> 
> 	public void setDetail(Detail Detail) {
> 		this.Detail = Detail;
> 	}
> 
> Is it the same way in tapestry 5?
> 
> Thanks


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: relationship between the entities (database tables) in tapestry 5

Posted by kk4Nabble <ka...@gmail.com>.
Thanks a lot for the reply.:-)



Otho wrote:
> 
> This is hibernate/jpa specific and has nothing to do with Tapestry. So
> yes,
> it should work if it did before.
> 
> 2009/4/21 kk4Nabble <ka...@gmail.com>
> 
>>
>> Hi all,
>>
>> If we wanted to have one to one relationship to other entity, in 
>> tapestry
>> 4
>> we used to do in following way.
>>
>> @OneToOne(cascade = CascadeType.REFRESH, fetch = FetchType.LAZY)
>>        @JoinColumn(name = "detail_oid")
>>        public Detail getDetail() {
>>                return Detail;
>>        }
>>
>>        public void setDetail(Detail Detail) {
>>                this.Detail = Detail;
>>        }
>>
>> Is it the same way in tapestry 5?
>>
>> Thanks
>> --
>> View this message in context:
>> http://www.nabble.com/relationship-between-the-entities-%28database--tables%29-in-tapestry-5-tp23153944p23153944.html
>> Sent from the Tapestry - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/relationship-between-the-entities-%28database--tables%29-in-tapestry-5-tp23153944p23154410.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: relationship between the entities (database tables) in tapestry 5

Posted by Otho <ta...@googlemail.com>.
This is hibernate/jpa specific and has nothing to do with Tapestry. So yes,
it should work if it did before.

2009/4/21 kk4Nabble <ka...@gmail.com>

>
> Hi all,
>
> If we wanted to have one to one relationship to other entity, in  tapestry
> 4
> we used to do in following way.
>
> @OneToOne(cascade = CascadeType.REFRESH, fetch = FetchType.LAZY)
>        @JoinColumn(name = "detail_oid")
>        public Detail getDetail() {
>                return Detail;
>        }
>
>        public void setDetail(Detail Detail) {
>                this.Detail = Detail;
>        }
>
> Is it the same way in tapestry 5?
>
> Thanks
> --
> View this message in context:
> http://www.nabble.com/relationship-between-the-entities-%28database--tables%29-in-tapestry-5-tp23153944p23153944.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>