You can try annotate the length of the id column uName in the Entity with
@Column(length=127) to match the length in the join table, assuming you can
not change the join table's column length.


On Mon, Aug 27, 2012 at 9:10 AM, Zhi Xie <[email protected]> wrote:

> I have met a problem using openjpa2.1.1.
> I have defined a JoinTable "user_group" with a JoinColumn "uName", the
>  uName is a column of Table user defined varchar(128). But there is not a
> length attribute inJoinColumn. So the default value 255 is set on the
> JoinColumn
> uName.
>
> My question is how to avoid the warning.
>
> WARN  [Schema] Existing column "uName" on table "test.user_group" is
> incompatible with the same column in the given schema definition. Existing
> column:
> Full Name: user_group.uName
> Type: varchar
> Size: 128
> Default: null
> Not Null: true
> Given column:
> Full Name: user_group.uName
> Type: varchar
> Size: 255
> Default: null
> Not Null: true
>
> I want to find a solution to avoid the warning.
> Could anybody give me any comment?
> --
> Best Regards
> Gary
>



-- 
Albert Lee.

Reply via email to