Hello Anshu,
You can try this:

    @ManyToOne(fetch=FetchType.*LAZY,*
targetEntity=package.name.PageType.class)
    @JoinColumn(name="pagetype", nullable=false)

      *public* PageType getPageType() {

            *return* pageType;

      }
Vincent



On Thu, Aug 21, 2008 at 10:17 AM, Anshu Dhamija <
[EMAIL PROTECTED]> wrote:

>  Hi all
>
>             I have made a model class in which I made object of another
> model which is basically primary and foreign key relationship
>
> My problem is if I give the name pageType to that object but when it goes
> to the database for searching the column it appends _*id with the name ie
> pageType*_id
>
> But in database I have given the name as page_type. Can anybody tell me is
> it the limitation of hibernate or a setting which can be changed.
>
>
>
> Also @Column(name="page_type ) is not allowed with ManyToOne Relationship
>
>
>
> @ManyToOne(fetch=FetchType.*LAZY*)
>
>       *public* PageType getPageType() {
>
>             *return* pageType;
>
>       }
>
>
>
> *Regards*
>
> Anshu
>
>
>

Reply via email to