[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.technology.dali] Re: Dali Galileo - Entities and properties naming stragety
|
Hello Everyone
I was just about to write about a similar issue, so I think I just attach it
here (hope that right).
The Dali validation always claims that it cannot resolve the column to my fields.
Example
@Entity
public class Person extends EntityBase {
private string name;
...
}
It will not be able to resolve the table-column NAME which is created by dali.
To get this to work I have to name the column directly
@Entity
public class Person extends EntityBase {
@Column(name = "Name")
private string name;
...
}
then recreate the schema and then this works.
It gets a little bit worse for @ManyToOne. For example
@OneToMany(mappedBy = "customer")
private List<BankAccount> accounts = new ArrayList<BankAccount>();
works, but the bidirectional mapping
@ManyToOne
private Customer customer;
claims "customer_Id" cannot be resolved.
I was googling this quite a bit because I thought the mistake is on my side, but
all tutorials I've found use the above code (no attributeoverride or something
like that).
Thanks
> Lionel,
>
> This appears to be an unfortunate regression in Entity Generation for
> Galileo. I have entered bug 285032* for this issue and targeted the fix
> for the first Galileo maintenance release. Thanks for bringing this to
> our attention.
>
> I can't think of a good workaround for this issue. You may want to
> generate your entities in a previous version of Dali and import them
> into your current workspace.
>
> Neil
>
>
> * https://bugs.eclipse.org/bugs/show_bug.cgi?id=285032
>
>
>
> Lionel wrote:
>
>> Hello,
>
>> Is it possible to configure Dali's naming strategy with Galileo ?
>> The new naming strategy uses the name of the table "as is" instead of
>> using
>> java naming conventions.
>> If the table is named "user_group" the generated entity is named
>> User_group.java instead of UserGroup.java as it was with Ganymede.
>
>> Is it possible to change this behaviour instead of renaming manually
>> all entities and all fields (which is not humanly possible) ?
>
>> Thanks
>
>