These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 
Author Message
 Post subject: Access type - field
PostPosted: Mon Nov 19, 2007 12:22 pm 
Newbie

Joined: Tue May 22, 2007 3:39 am
Posts: 15
Hello.

In my project I use Hibernate Annotations 3.3.0.GA and
property access type. I'd like in one case use field access type.
I write before getter method:

@AccessType("field")
@Column(name = "NAZWA", nullable = false, length = 50)
public Integer getWydNazwa() {
return Integer.valueOf(wydNazwa) * 100;

}

but HB during persist call getWydNazwa() to get value.
I was trying move @AccessType("field") before class property - this give me the same effect.

Is possible do this ?

Thanks in advance
gienas


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 19, 2007 2:16 pm 
Newbie

Joined: Fri Mar 30, 2007 5:23 pm
Posts: 16
Location: New York, NY
I don't use annotations personally, but it stands to reason that you would also need to move the @Column annotation up to the field itself - otherwise Hibernate will still consider the getter to be the correct way to access the column, and most likely ignore the @AccessType annotation that's on the field.

Just a shot in the dark, though - as I said, not an annotations guy myself.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 19, 2007 3:20 pm 
Newbie

Joined: Tue May 22, 2007 3:39 am
Posts: 15
I moved also @column annotations and this no take effect.

Regards
gienas


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 20, 2007 9:29 am 
Newbie

Joined: Tue May 22, 2007 3:39 am
Posts: 15
It was bug :

http://opensource.atlassian.com/project ... sion=10681

regards
gienas


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.