• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Jeanne Boyarsky
  • Tim Cooke
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
Bartenders:

Finding entity column length using JPA annotations

 
Ranch Hand
Posts: 294
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
I'm sure glad that he's gone. Now I can read this tiny ad in peace!
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic