You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@openjpa.apache.org by Fernando Padilla <fe...@alum.mit.edu> on 2008/10/16 20:37:27 UTC

custom types

Though I do like the ease of use of Externalizer/Factory, I was just 
wondering if I could register my custom datatypes, so that they will be 
treated almost like native types, so I have less meta-data to maintain..

1)
	@Persistent
	@Externalizer("getIdLong")
	private TeamId ptTeamId;

2)
	@Basic // which ideally might be optional
	private TeamId ptTeamId;

Re: custom types

Posted by Fernando Padilla <fe...@alum.mit.edu>.
An aside, is there a standard JPA way to encode 'custom' types, or 
externalizer/factory type setups?


Fernando Padilla wrote:
> Though I do like the ease of use of Externalizer/Factory, I was just 
> wondering if I could register my custom datatypes, so that they will be 
> treated almost like native types, so I have less meta-data to maintain..
> 
> 1)
>     @Persistent
>     @Externalizer("getIdLong")
>     private TeamId ptTeamId;
> 
> 2)
>     @Basic // which ideally might be optional
>     private TeamId ptTeamId;
>