This week's book giveaway is in the Android forum.
We're giving away four copies of Android Programming: The Big Nerd Ranch Guide and have Bill Phillips & Chris Stewart on-line!
See this thread for details.
Win a copy of Android Programming: The Big Nerd Ranch Guide this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Finding entity column length using JPA annotations  RSS feed

 
Doug Slattery
Ranch Hand
Posts: 294
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi folks,

I've been looking for a solution to this problem and have only found examples using mapping.

[Edit]Fat fingered something.

I need to format the output of a result set to certain column lengths based on the DDL declared length.

If for instance my entity named "USER" has:

I'd like to do something like:

This is a simple example of how I'd like to do it and realize there's more elbow grease involved, but hopefully it makes sense.

Anyone done anything like this before?

[Edit] Forgot to mention I'm using Hibernate.

Thanks,
-Doug

-- Nothing is impossible if ImPossible
 
Marcelo Astudillo
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I need the same and I have found a solution that retrieves the annotation from the class in a managed bean procedure. I can't retrieve some annotations from database, even I have to define in the class. I'm work with Netbeans 6.9.1.

Greetings
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!