This is Hibernate behaviour - I assume you're having your database
generated?
Anyway, you have two options:
- configure Hibernate's NamingStrategy;
- use JoinColumn instead of Column.
Regards,
Levi
On Tue, Aug 25, 2009 at 4:29 PM, Fabio Fonseca <draco...@gmail.com> wrote:
> First things first, my thank you for you guys. I'm getting the hang of
> framework by each day!
>
> Now my question is:
>
> I have a class (model) called Inventory, inside this class there is a
> property called
>
> @ManyToOne
> private Location location;
>
> which ends up in the DB as a column called location_id; Is it Stripersist
> that adds the suffix "_id" to the column's name in the DB?
>
> Anyway, the persistance is working alright. But I don't it to be called
> location_id inside the DB's table. So I tried:
>
> @ManyToOne
> @Column(name="id_loc")
> private Location location;
>
> which doesn't work. All I get is a null pointer exception in the db.
>
> Is there some way to control the column's name before they are added to the
> DB?
>
> thank you very much!
> Fabio
>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus
> on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now. http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Stripes-users mailing list
> Stripes-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/stripes-users
>
>
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users