Not quite sure about this. I don’t like it as Persistent is an openjpa annotation. Probably use PERS if @Basic or @Column is specified and the type is _not_ Serializable?
In 2.2 the spec only explicitly requires the support of Serializable. So from a spec pov it is fine, but it is still somehow unsatisfying. Will try the trick with PERS. Liegrue, strub > Am 30.06.2015 um 18:34 schrieb Romain Manni-Bucau <rmannibu...@gmail.com>: > > Hi Mark, > > didnt check the code but wonder if adding @Persistent solves it, if so we > can just implicitely consider a field @Persistent if there are some other > annotations (would be the same with @Externalizer/@Factory I think) > > > Romain Manni-Bucau > @rmannibucau <https://twitter.com/rmannibucau> | Blog > <http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> | > LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber > <http://www.tomitribe.com> > > 2015-06-30 9:31 GMT-07:00 Mark Struberg <strub...@yahoo.de>: > >> Hi folks! >> >> I sense some chicken-egg proglem with FieldMapping and what field becomes >> a persistent column. >> >> The point is that only fields which have a valid FieldMapping will become >> a persistent column. >> >> Currently the main check - as far as I do understand so far - is in >> PersistenceMetaDataDefaults#getPersistenceStrategy. >> Only fields which have some specific mapping annotations >> (PersistenceMetaDataDefaults#_strats) or implement Serializable get >> automatically picked up. Other classes get totally ignored. Even if I >> explicitly have a @Strategy annotation on them or if I register global >> FieldStrategies. >> >> I cannot extend the _strats to @Strategy.class as >> PersistenceMetaDataDefaults is defined in openjpa-persistence but Strategy >> is only defined later in openjpa-persistence-jdbc. >> >> What we could possibly do is to extend _attrs with the @Column annotation >> class? >> >> Any other ideas? >> >> LieGrue, >> strub